Breyta

Deila með


ISymbolWriter.DefineLocalVariable Method

Definition

Defines a single variable in the current lexical scope.

public:
 void DefineLocalVariable(System::String ^ name, System::Reflection::FieldAttributes attributes, cli::array <System::Byte> ^ signature, System::Diagnostics::SymbolStore::SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset);
public void DefineLocalVariable (string name, System.Reflection.FieldAttributes attributes, byte[] signature, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset);
abstract member DefineLocalVariable : string * System.Reflection.FieldAttributes * byte[] * System.Diagnostics.SymbolStore.SymAddressKind * int * int * int * int * int -> unit
Public Sub DefineLocalVariable (name As String, attributes As FieldAttributes, signature As Byte(), addrKind As SymAddressKind, addr1 As Integer, addr2 As Integer, addr3 As Integer, startOffset As Integer, endOffset As Integer)

Parameters

name
String

The local variable name.

attributes
FieldAttributes

A bitwise combination of the local variable attributes.

signature
Byte[]

The local variable signature.

addrKind
SymAddressKind

The address types for addr1, addr2, and addr3.

addr1
Int32

The first address for the local variable specification.

addr2
Int32

The second address for the local variable specification.

addr3
Int32

The third address for the local variable specification.

startOffset
Int32

The start offset for the variable. If this parameter is zero, it is ignored and the variable is defined throughout the entire scope. If the parameter is nonzero, the variable falls within the offsets of the current scope.

endOffset
Int32

The end offset for the variable. If this parameter is zero, it is ignored and the variable is defined throughout the entire scope. If the parameter is nonzero, the variable falls within the offsets of the current scope.

Remarks

The startOffset and endOffset parameters are optional. If their value is zero, they are ignored and the variable is defined throughout the entire scope. If their value is nonzero, the variable falls within the offsets of the current scope.

You can call DefineLocalVariable multiple times for a variable of the same name that occurs multiple times in different offset ranges throughout a scope. (In this case, start and end offsets must not overlap.)

Applies to