I want to decorate a VB.NET class with meta data to describe additional information associated with the properties of the class. Also I need this information to be visible through reflelction. Any suggestions? Is this even possible for me to accomplish? Thanks.
Asked
Active
Viewed 383 times
3 Answers
4
You can annotate most of C#/VB entities with attributes. You can develop your own (by deriving from System.Attribute) or reuse existing
Dewfy
- 22,648
- 12
- 68
- 116
-
1Check out http://stackoverflow.com/questions/20346/c-what-are-attributes for more information. – Patrik Svensson Aug 17 '09 at 14:40
3
Use attibutes on the method or classes. They are accessible through reflection.
http://msdn.microsoft.com/en-us/library/aa287992%28VS.71%29.aspx
mcintyre321
- 12,598
- 8
- 63
- 99
1
Attributes are the accepted way to add metadata to a class, methods, properties, etc. You can use one of the many existing attributes or easily create your own.
Scott Dorman
- 41,316
- 11
- 76
- 109