Share via


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
);

Parameters

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

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

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

Remarks

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>.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

ICorDebugObjectValue Interface

ICorDebugObjectValue2 Interface