FlagsAttribute

Description

sealed class System.FlagsAttribute

Derived from

Attribute abstract

Indicates that an enumeration can be treated as a bit field; that is, a set of flags.

Per convention, the following rules should be adhered to by flag enumerations:

  • There is an item named None / Unknown / …​ with the value 0.

  • There is an item named All / Any / …​ which contains all flag bits.

  • Items named Mask* represent bitmasks and are composed of one or more flag bits.

  • All other items represent single flag bits.