Adnotacje danych C # w interfejsie
Szybkie pytanie...
Jeśli umieścisz notację w interfejsie ...
Powiedz [Wymagane]
mogę anulować tę notację w klasie C # dla właściwości?
tj. czy mogę ...
Interface IFoo
{
[Required]
string Bar {get; set;}
}
Class Foo : IFoo
{
string Bar {get; set;}
}
czy muszę po prostu nie umieszczać notacji w interfejsie i robić to ...
Interface IFoo
{
string Bar {get; set;}
}
Class Foo : IFoo
{
[Required]
string Bar {get; set;}
}