AttributeTargets

Overview

Allowed targets for an attribute for the AttributeUsage Attribute.

Location

Value Description
Assembly Only allowed on [assembly: level attributes.
Class Only allowed on classes.
Constructor Only allowed on constructors.
Delegate only allowed on delegate types.
Enum Only alowed on enums.
Event Only allowed on events.
Field Only allowed on fields.
Interface Only allowed on interface types
Method Only allowed on methods
Parameter Only allowed on parameters
Property Only allowed on properties.
ReturnValue Only allowed on results.
Struct Only allowed on structs/records.