共用方式為


ICorDebugClass::GetStaticFieldValue 方法

取得指定靜態欄位的值。

語法

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

參數

fieldDef [在]參考要擷取之欄位的欄位 Def 權杖。

pFrame [在]ICorDebugFrame 物件的指標,代表要用來消除執行緒、內容或應用程式領域靜態數據之間歧義的框架。

如果靜態欄位相對於執行緒、內容或應用程式網域,則框架將決定適當的值。

ppValue [出]ICorDebugValue 物件位址的指標,代表靜態欄位的值。

備註

對於參數化類型,靜態欄位的值是相對於特定實例化的。 因此,如果類別建構函式採用類型 Type的參數,則呼叫 ICorDebugType::GetStaticFieldValue 而不是 ICorDebugClass::GetStaticFieldValue

需求

平台: 請參閱 .NET 支援的作業系統

標題: CorDebug.idl、CorDebug.h

圖書館: CorGuids.lib

.NET 版本: 自 .NET Framework 1.0 起提供