ISymbolWriter.DefineField Method

Definition

Defines a field in a type or a global field.

C#
public void DefineField(System.Diagnostics.SymbolStore.SymbolToken parent, string name, System.Reflection.FieldAttributes attributes, byte[] signature, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3);

Parameters

parent
SymbolToken

The metadata type or method token.

name
String

The field name.

attributes
FieldAttributes

A bitwise combination of the field attributes.

signature
Byte[]

The field signature.

addrKind
SymAddressKind

The address types for addr1 and addr2.

addr1
Int32

The first address for the field specification.

addr2
Int32

The second address for the field specification.

addr3
Int32

The third address for the field specification.

Remarks

The DefineField method defines a single variable that is not within a method by using specified fields in classes, bit fields, and so on.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1