AttributeTargets Enumeration
Contains the application elements on which it is valid to apply an attribute.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
[FlagsAttribute]
[SerializableAttribute]
public enum AttributeTargets
Members
Member name | Description | |
---|---|---|
All = 16383 | A value that enables you to apply an attribute to any application element. | |
Assembly = 1 | A value that enables you to apply an attribute to an assembly. | |
Class = 4 | A value that enables you to apply an attribute to a class. | |
Constructor = 32 | A value that enables you to apply an attribute to a constructor. | |
Delegate = 4096 | A value that enables you to apply an attribute to a delegate. | |
Enum = 16 | A value that enables you to apply an attribute to an enumeration. | |
Event = 512 | A value that enables you to apply an attribute to an event. | |
Field = 256 | A value that enables you to apply an attribute to a field. | |
Interface = 1024 | A value that enables you to apply an attribute to an interface. | |
Method = 64 | A value that enables you to apply an attribute to a method. | |
Module = 2 | A value that enables you to apply an attribute to a module. A module is a portable executable file (.dll or .exe). | |
Parameter = 2048 | A value that enables you to apply an attribute to a parameter. | |
Property = 128 | A value that enables you to apply an attribute to a property. | |
ReturnValue = 8192 | A value that enables you to apply an attribute to a return value. | |
Struct = 8 | A value that enables you to apply an attribute a structure (a value type). |
Remarks
You can combine the members of this enumeration by using a bitwise OR.
Version Information
Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.