Unsafe.IsNullRef<T>(T) Metod

Definition

Avgör om en given hanterad pekare till ett värde av typen T är en null-referens.

public:
generic <typename T>
 static bool IsNullRef(T % source);
public static bool IsNullRef<T>(ref readonly T source) where T : allows ref struct;
public static bool IsNullRef<T>(ref T source);
public static bool IsNullRef<T>(ref readonly T source);
static member IsNullRef : 'T -> bool
Public Shared Function IsNullRef(Of T) (ByRef source As T) As Boolean

Typparametrar

T

Den hanterade pekarens elementtyp.

Parametrar

source
T

Den hanterade pekaren som ska kontrolleras.

Returer

true om source är en null-referens, annars false.

Kommentarer

Den här kontrollen liknar konceptuellt (void*)(&source) == nullptr.

Gäller för