빠른 질문 ...C# 데이터 주석
내가 인터페이스의 표기법을 넣으면...
말 [필수]
수 나는 ommit 그에 대한 C# 클래스에 표기 그 속성?
즉, 수 I ... 인터페이스에서 데이터 주석을 배치
Interface IFoo
{
[Required]
string Bar {get; set;}
}
Class Foo : IFoo
{
string Bar {get; set;}
}
또는 난 그냥 인터페이스의 표기법을 넣고이 작업을 수행 할 필요합니까 ...
Interface IFoo
{
string Bar {get; set;}
}
Class Foo : IFoo
{
[Required]
string Bar {get; set;}
}
수업에 참가해야합니다. 참조 : http://bradwilson.typepad.com/blog/2011/08/interface-attributes-class-attributes.html –