Megosztás a következőn keresztül:


ICorDebugClass::GetStaticFieldValue Method

Gets the value of the specified static field.

HRESULT GetStaticFieldValue (
    [in]  mdFieldDef         fieldDef,
    [in]  ICorDebugFrame     *pFrame,
    [out] ICorDebugValue     **ppValue
);

Parameters

  • fieldDef
    [in] A field Def token that references the field to be retrieved.

  • pFrame
    [in] A pointer to an ICorDebugFrame object that represents the frame to be used to disambiguate among thread, context, or application domain statics.

    If the static field is relative to a thread, a context, or an application domain, the frame will determine the proper value.

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

Remarks

For parameterized types, the value of a static field is relative to the particular instantiation. Therefore, if the class constructor takes parameters of type Type, call ICorDebugType::GetStaticFieldValue instead of ICorDebugClass::GetStaticFieldValue.

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

ICorDebugClass Interface