Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
C# & .Net Framework Reference
Accessing Attributes With Reflection (C#)

Full Name:
Accessing Attributes With Reflection (C#)

Short Name:
Accessing Attributes With Reflection (C#)

Type of Entity:
C#

Abstract:
The fact that you can define custom attributes and place them in your source code would be of little value without some way of retrieving that information and acting on it. C# has a reflection system that allows you to retrieve the information that was defined with custom attributes. The key method is GetCustomAttributes, which returns an array of objects that are the run-time equivalents of the source code attributes. This method has several overloaded versions. For more information, see Attribute.

MSDN Source URL:
http://msdn2.microsoft.com/z919e8tw.aspx

 
COPYRIGHT/DISCLAIMER | CONTACT US