Type.GetNullableUnderlyingType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the underlying type argument of the current nullable type.
public:
virtual Type ^ GetNullableUnderlyingType();
public virtual Type? GetNullableUnderlyingType();
abstract member GetNullableUnderlyingType : unit -> Type
override this.GetNullableUnderlyingType : unit -> Type
Public Overridable Function GetNullableUnderlyingType () As Type
Returns
The underlying type argument if the current type is a constructed Nullable<T> type; otherwise, null.
Exceptions
The current type is a derived type that doesn't override this method.
Remarks
Derived classes must override this method. The base implementation throws NotSupportedException.