Table of Contents

Class Enum

Namespace
System
Assembly
mscorlib.dll

Provides the base class for enumerations.

public abstract class Enum
Inheritance
Enum
Inherited Members
Extension Methods

Constructors

Enum()

protected Enum()

Methods

HasFlag(Enum)

Determines whether one or more bit fields are set in the current instance.

public bool HasFlag(Enum flag)

Parameters

flag Enum

An enumeration value.

Returns

bool

true if the bit field or bit fields that are set in flag are also set in the current instance; otherwise, false.

Exceptions

ArgumentException

flag is a different type than the current instance.

ToString()

Converts the value of this instance to its equivalent string representation.

public override string ToString()

Returns

string

The string representation of the value of this instance.

Remarks

Available only in mscorlib build with support for System.Reflection.