FlagsAttribute Class
Collapse the table of content
Expand the table of content

FlagsAttribute Class

.NET Micro Framework 3.0
Indicates that an enumeration can be treated as a bit field (a set of flags).

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

public class FlagsAttribute : Attribute

In general, you use bit fields for lists of elements that might occur in combination, whereas generally you use enumeration constants for lists of mutually exclusive elements. For this reason, bit fields are designed such that you can combine elements with a bitwise OR operation to generate unnamed values; you cannot do this with enumerated constants.

Note that different programming languages vary in their use of bit fields and enumeration constants.

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

Community Additions

© 2015 Microsoft