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
  • 11,165
  • 9
  • 62
  • 113

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
  • 23,277
  • 13
  • 73
  • 121
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,996
  • 8
  • 66
  • 103
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
  • 42,236
  • 12
  • 79
  • 110