0

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.

Achilles
  • 10,915
  • 8
  • 61
  • 112

3 Answers3

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
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