RuntimeHelpers.Box(Byte, RuntimeTypeHandle) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從位於目標參考的資料中建立指定類型的盒裝物件。
public:
static System::Object ^ Box(System::Byte % target, RuntimeTypeHandle type);
public static object? Box(ref byte target, RuntimeTypeHandle type);
static member Box : byte * RuntimeTypeHandle -> obj
Public Shared Function Box (ByRef target As Byte, type As RuntimeTypeHandle) As Object
參數
- target
- Byte
目標資料。
- type
- RuntimeTypeHandle
要製作的盒子類型。
傳回
一個包含指定資料的盒裝物件。
例外狀況
指定的型別 handle 為 null。
指定的類型不能建立一個盒裝實例。
傳遞入型態是類似byref型態。