IXCLRDataTypeInstance::GetStaticFieldByIndex Method

Gets one static field of the type. Because static field ordering is not fixed, this can also return name information and/or the metadata token if the caller passes in appropriate values.

NOTE: This method is obsolete.

Note

This API was originally designed for internal use in the runtime. Although it is now supported for 3rd party use, we recommend working with ICorDebug and ICorProfiler APIs when possible.

Syntax

HRESULT GetStaticFieldByIndex(
    [in] ULONG32 index,
    [in] IXCLRDataTask *tlsTask,
    [out] IXCLRDataValue **field,
    [in] ULONG32 bufLen,
    [out] ULONG32 *nameLen,
    [out, size_is(bufLen)] WCHAR nameBuf[],
    [out] mdFieldDef *token
);

Parameters

index
[in] The 0-based index of the static field to retrieve.

tlsTask
[in] The managed task for which to retrieve any static field that is thread local

field
[out] The static field.

bufLen
[in] The size in characters of the buffer nameBuf.

nameLen
[out] The number of characters in the static field name which were written to the nameBuf buffer.

nameBuf
[out] The name of the static field.

token
[out] The metadata token of the static field.

method
[out] The method instance corresponding to the stack frame.

Remarks

The provided method is part of the IXCLRDataTypeInstance interface and corresponds to the 11th slot of the virtual method table.

Requirements

Platforms: See System Requirements. Header: None Library: None .NET Framework Versions: Available since 4.7

See also