共用方式為


ICorDebugEval2::CreateValueForType 方法

更新:2007 年 11 月

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

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

參數

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

  • ppValue
    [out] 表示值之 ICorDebugValue 物件的位址指標。

備註

CreateValueForType 可讓您指定任意物件型別,包括 List<int> 之類的建構型別,來一般化 ICorDebugEval::CreateValue。這個方法的唯一目的是產生可傳遞至函式評估的值。

型別必須是類別或實值型別。您無法使用這個方法來建立陣列值或字串值。

需求

**平台:**請參閱 .NET Framework 系統需求

**標頭:**CorDebug.idl

**程式庫:**CorGuids.lib

**.NET Framework 版本:**3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0

請參閱

參考

ICorDebugEval2