Nyelv

Pointer.Box(Void*, Type) Metódus

Definíció

A megadott nem felügyelt memóriamutatót és a mutatóhoz társított típust egy felügyelt Pointer burkolóobjektumba helyezi. A rendszer menti az értéket és a típust, hogy a natív kódból elérhessék őket egy hívás során.

public:
 static System::Object ^ Box(void* ptr, Type ^ type);
public static object Box(void* ptr, Type type);
[System.Security.SecurityCritical]
public static object Box(void* ptr, Type type);
static member Box : nativeptr<unit> * Type -> obj
[<System.Security.SecurityCritical>]
static member Box : nativeptr<unit> * Type -> obj

Paraméterek

ptr
Void*

A megadott nem felügyelt memóriamutató.

type
Type

A paraméterhez ptr társított típus.

Válaszok

Mutatóobjektum.

Attribútumok

Kivételek

type nem mutató.

type az null.

A következőre érvényes: