Attributes vs. CustomAttributes in PropertyInfo

PropertyInfo.Attributes doesn’t have anything to do with the Attribute class. Check the PropertyAttributes enumeration for values you may encounter. These are CLR implementation details that have no obvious connection to C# code. Yes, that was an unfortunate naming choice.

To find attributes like your [Required] attribute you must use the CustomAttributes property.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)