.NET FAQs Unleashed!
 

What is a class attribute in .NET?

Class Attributes - Is a kind of property attached with a class. It allows some data to be attached to a class or method. This data becomes part of the metadata for the class, and (like other class metadata) can be accessed via reflection. An example of a metadata attribute is [serializable], which can be attached to a class and means that instances of the class can be serialized.


[Serializable]
Public Class SampleClass
( ... )

1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22