AttributeTargets Enumeration

Windows Automotive 5.0/5.5
Contains the application elements on which it is valid to apply an attribute.

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

[FlagsAttribute]
[SerializableAttribute]
public enum AttributeTargets

 Member nameDescription
All = 16383A value that enables you to apply an attribute to any application element.
Assembly = 1A value that enables you to apply an attribute to an assembly.
Class = 4A value that enables you to apply an attribute to a class.
Constructor = 32A value that enables you to apply an attribute to a constructor.
Delegate = 4096A value that enables you to apply an attribute to a delegate.
Enum = 16A value that enables you to apply an attribute to an enumeration.
Event = 512A value that enables you to apply an attribute to an event.
Field = 256A value that enables you to apply an attribute to a field.
Interface = 1024A value that enables you to apply an attribute to an interface.
Method = 64A value that enables you to apply an attribute to a method.
Module = 2A value that enables you to apply an attribute to a module. A module is a portable executable file (.dll or .exe).
Parameter = 2048A value that enables you to apply an attribute to a parameter.
Property = 128A value that enables you to apply an attribute to a property.
ReturnValue = 8192A value that enables you to apply an attribute to a return value.
Struct = 8A value that enables you to apply an attribute a structure (a value type).

You can combine the members of this enumeration by using a bitwise OR.

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

Community Additions

ADD
Show: