다음을 통해 공유


Boxing(C++/CLI)

Boxing is the process of converting a value type to the type object or to any interface type that's implemented by the value type. When the common language runtime (CLR) boxes a value type, it wraps the value in a System.Object and stores it on the managed heap. unboxing하면 개체에서 값 형식이 추출됩니다. Boxing은 암시적이며 unboxing은 명시적입니다.

관련 문서

제목

설명

방법: 명시적으로 Boxing을 요청

Describes how to explicitly request boxing on a variable.

방법: 값 형식 만들기 및 사용 암시적 Boxing gcnew를 사용

Shows how to use gcnew to create a boxed value type that can be placed on the managed, garbage-collected heap.

방법: Unbox

Shows how to unbox and modify a value.

표준 변환 및 암시적 boxing

Shows that a standard conversion is chosen by the compiler over a conversion that requires boxing.

Visual C++의 .NET 프로그래밍

The top-level article for .NET programming in the Visual C++ documentation.