ICorDebugObjectValue::GetFieldValue Method

Gets the value of the specified field of the specified class for this object value.


HRESULT GetFieldValue (  
    [in]  ICorDebugClass     *pClass,  
    [in]  mdFieldDef         fieldDef,  
    [out] ICorDebugValue     **ppValue  


[in] A pointer to an "ICorDebugClass" object that represents the class for which to get the field value.

[in] An mdFieldDef token that references the metadata describing the field.

[out] A pointer to an "ICorDebugValue" object that represents the value of the specified field.


The class, specified in the pClass parameter, must be in the hierarchy of the object value's class, and the field must be a field of that class.

The GetFieldValue method will still succeed for generic objects and generic classes. For example, if MyDictionary<V> inherits from Dictionary<string,V>, and the object value is of type MyDictionary<int32>, passing the ICorDebugClass object for Dictionary<K,V> will successfully get a field of Dictionary<string,int32>.


Platforms: See System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: Available since 1.0

See also