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
ます。