Type.GetEnumUnderlyingType Method ()

.NET Framework (current version)

Returns the underlying type of the current enumeration type.

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

public virtual Type GetEnumUnderlyingType()

Return Value

Type: System.Type

The underlying type of the current enumeration.

Exception Condition

The current type is not an enumeration.


The enumeration type is not valid, because it contains more than one instance field.

By default, the underlying type of an enumeration in C# and Visual Basic is Int32. Other integer types can be specified.

.NET Framework
Available since 4.0
Return to top