ICorDebugEval2::CreateValueForType 方法

取得指定型別的新 ICorDebugValue 指標,其初始值為零或 null。

語法

HRESULT CreateValueForType (  
    [in] ICorDebugType         *pType,  
    [out] ICorDebugValue       **ppValue  
);  

參數

pType
[in] 代表型別的 ICorDebugType 物件的指標。

ppValue
[out] ICorDebugValue 物件的位址指標,代表該值。

備註

CreateValueForType 藉由讓您指定任意物件型別,包括建構的型別 (例如 List<int>),使 ICorDebugEval::CreateValue 一般化。 此方法的唯一目的是產生值,以便傳遞至語言函式評估。

型別必須是類別或實值型別。 此方法不可用於建立陣列值或字串值。

規格需求

平台:請參閱系統需求

標頭:CorDebug.idl、CorDebug.h

程式庫:CorGuids.lib

.NET Framework版本:自 2.0 起可用