Nullable 類別

定義

支援可以指派 null 的實值類型。 此類別無法獲得繼承。

public ref class Nullable abstract sealed
public static class Nullable
[System.Runtime.InteropServices.ComVisible(true)]
public static class Nullable
type Nullable = class
[<System.Runtime.InteropServices.ComVisible(true)>]
type Nullable = class
Public Class Nullable
繼承
Nullable
屬性

備註

如需此 API 的詳細資訊,請參閱 可為 Null 的補充 API 備註

方法

Compare<T>(Nullable<T>, Nullable<T>)

比較兩個 Nullable<T> 物件的相對值。

Equals<T>(Nullable<T>, Nullable<T>)

表示兩個指定的 Nullable<T> 物件是否相等。

GetUnderlyingType(Type)

傳回已指定可為 null 型別的基礎型別引數。

GetValueRefOrDefaultRef<T>(Nullable<T>)

擷取儲存值之 實例中 Nullable<T> 位置的唯讀參考。

適用於

另請參閱