Custom attribute is essentially a class that provides associated additional information for the target element and obtains additional information (to obtain the feature class) in reflection mode at runtime ), it is equivalent to adding a tag to the element elegantly. This tag is a class.
Attribute is used to provide associated additional information for an element.
Attribute classes are instantiated during compilation, rather than being instantiated at runtime as a normal class. Attribute. GetCustomAttribute () can obtain the object of the feature class.
• MSDN believes that attributes describe how to serialize data, specify features for force security, and limit the optimization of the real-time (JIT) compiler, so that code can be easily debugged. Attribute can also record file names or code authors, or control the visibility of controls and members during form development.
• Dudu Boss's series of articles "Application of Attribute in. net programming" will give you a lot of inspiration in application and deserve research. Http://www.cnblogs.com/dudu/articles/4449.html
• Comrade Alexander's series of articles "teach you how to write ORM (6)" also has a good interpretation.
• Idior's article "Basic Principles and Extension Mechanism of Remoting" is also rewarding, so it is worth adding.