Type.GetEnumUnderlyingType Method ()

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns the underlying type of the current enumeration type.

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

Public Overridable Function GetEnumUnderlyingType As Type

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