Pointer.Box(Void*, Type) 메서드

정의

제공된 관리되지 않는 메모리 포인터와 해당 포인터에 연결된 형식을 관리되는 Pointer 래퍼 개체에 포함시킵니다. 해당 값과 형식은 호출 중에 네이티브 코드에서 액세스할 수 있도록 저장됩니다.

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

매개 변수

ptr
Void*

제공된 관리되지 않는 메모리 포인터입니다.

type
Type

ptr 매개 변수와 관련된 형식입니다.

반환

포인터 개체입니다.

특성

예외

type이 포인터가 아닌 경우

type이(가) null인 경우

적용 대상