語言

Type.GetNullableUnderlyingType 方法

定義

取得目前可空型態的底層型別參數。

public:
 virtual Type ^ GetNullableUnderlyingType();
public virtual Type? GetNullableUnderlyingType();
abstract member GetNullableUnderlyingType : unit -> Type
override this.GetNullableUnderlyingType : unit -> Type
Public Overridable Function GetNullableUnderlyingType () As Type

傳回

若當前型態為構造 Nullable<T> 型態,則為底層型別參數;否則,為 null。

例外狀況

目前的型別是導出型別,不會覆寫此方法。

備註

衍生類別必須覆寫此方法。 基礎實作會 NotSupportedException拋出 。

適用於