Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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
ArgumentException

The current type is not an enumeration.

-or-

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
Show: