interface IRestrictionUserControl
{
public GeneralRestriction Foo{ get; protected set; }
}
public partial class RestrictionUserControl : UserControl, IRestrictionUserControl
{
public RestrictionUserControl(Restriction r)
{
InitializeComponent();
Foo = r;
}
}
我得到错误:The name 'Foo' does not exist in the current context
。我究竟做错了什么?
注意:Restriction
继承自GeneralRestriction
.