Table of Contents

Enum AttributeTargets

Namespace
System
Assembly
mscorlib.dll

Specifies the application elements on which it is valid to apply an attribute.

[Flags]
public enum AttributeTargets

Fields

All = Assembly | Module | Class | Struct | Enum | Constructor | Method | Property | Field | Event | Interface | Parameter | Delegate | ReturnValue

Attribute can be applied to any application element.

Assembly = 1

Attribute can be applied to an assembly.

Class = 4

Attribute can be applied to a class.

Constructor = 32

Attribute can be applied to a constructor.

Delegate = 4096

Attribute can be applied to a delegate.

Enum = 16

Attribute can be applied to an enumeration.

Event = 512

Attribute can be applied to an event.

Field = 256

Attribute can be applied to a field.

Interface = 1024

Attribute can be applied to an interface.

Method = 64

Attribute can be applied to a method.

Module = 2

Attribute can be applied to a module.

Parameter = 2048

Attribute can be applied to a parameter.

Property = 128

Attribute can be applied to a property.

ReturnValue = 8192

Attribute can be applied to a return value.

Struct = 8

Attribute can be applied to a structure; that is, a value type.