[ACCEPTED]-Attribute on Interface members does not work-attributes

Accepted answer
Score: 27

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?

More Related questions