다음을 통해 공유


Attribute Class

Constitutes the base class for custom attributes.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

[AttributeUsageAttribute]
[SerializableAttribute]
public abstract class Attribute

Remarks

Although you can use any user-defined type as an attribute, it is expected that most attributes will be instances of types derived from the Attribute class.

All attributes derive directly or indirectly from the Attribute class. You can apply attributes to any target object. In addition, you can apply multiple instances of an attribute to the same target object. Note that attributes can also be inherited by an object derived from a target object. Compilers and other development tools use this information to identify which attributes are custom attributes.

You can store custom attributes with any element of the metadata. This mechanism makes it easy to store application-specific information at compile time and then access it either at run time or when another tool reads the metadata.

The .NET Micro Framework predefines some attribute types and uses them to control run-time behavior. Developers are encouraged to define and use additional attribute types, as needed.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Attribute Members
System Namespace