Open sandboxFocus

Property UnderlyingType

UnderlyingType

Gets the underlying type of an enum, the non-nullable type of a nullable reference type, or the current type.

Declaration
INamedType UnderlyingType { get; }
Property Value
Type Description
INamedType
Remarks

This property has three meanings, so the caller has to know the kind of the type to know which type it returned. The underlying type of an enum is also exposed by UnderlyingType, which has a single meaning. That facet is reached through Facets, and it is null for a type that is not an enum.

See Also