[ACCEPTED]-Attribute on Interface members does not work-attributes
Accepted answer
Attributes on interface properties doesn't 4 get inherited to the class, you may make 3 your interface an Abstract Class.
Found 2 an answer from Microsoft:
The product team does not want to implement 1 this feature, for two main reasons:
- Consistency with DataAnnotations.Validator
- Consistency with validation behavior in ASP.Net MVC
- tricky scenario: a class implements two interfaces that have the same property, but with conflicting attributes on them. Which attribute would take precedence?
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.