ICorDebugEval2::CreateValueForType 方法ICorDebugEval2::CreateValueForType Method
取得指定類型之新 ICorDebugValue 的指標,其初始值為零或 null。Gets a pointer to a new ICorDebugValue of the specified type, with an initial value of zero or null.
語法Syntax
HRESULT CreateValueForType (
[in] ICorDebugType *pType,
[out] ICorDebugValue **ppValue
);
參數Parameters
pType
在代表類型之 ICorDebugType 物件的指標。[in] Pointer to an ICorDebugType object that represents the type.
ppValue
擴展代表值之物件的位址指標 ICorDebugValue
。[out] Pointer to the address of an ICorDebugValue
object that represents the value.
備註Remarks
CreateValueForType
一般化 ICorDebugEval:: CreateValue ,可讓您指定任意物件類型,包括之類的結構化類型 List<int>
。CreateValueForType
generalizes ICorDebugEval::CreateValue by allowing you to specify an arbitrary object type, including constructed types such as List<int>
. 這種方法的唯一目的是產生可傳遞給函數評估的值。The only purpose of this method is to generate a value that can be passed to a function evaluation.
型別必須是類別或實值型別。The type must be a class or a value type. 您無法使用這個方法來建立陣列值或字串值。You cannot use this method to create array values or string values.
規格需求Requirements
平台: 請參閱 系統需求。Platforms: See System Requirements.
標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h
程式庫: CorGuids.libLibrary: CorGuids.lib
.NET Framework 版本:自 2.0 起可用Available since 2.0.NET Framework Versions: 自 2.0 起可用Available since 2.0