Export (0) Print
Expand All

ISymbolWriter.DefineLocalVariable Method

Defines a single variable in the current lexical scope.

Namespace: System.Diagnostics.SymbolStore
Assembly: mscorlib (in mscorlib.dll)

void DefineLocalVariable (
	string name,
	FieldAttributes attributes,
	byte[] signature,
	SymAddressKind addrKind,
	int addr1,
	int addr2,
	int addr3,
	int startOffset,
	int endOffset
)
void DefineLocalVariable (
	String name, 
	FieldAttributes attributes, 
	byte[] signature, 
	SymAddressKind addrKind, 
	int addr1, 
	int addr2, 
	int addr3, 
	int startOffset, 
	int endOffset
)
function DefineLocalVariable (
	name : String, 
	attributes : FieldAttributes, 
	signature : byte[], 
	addrKind : SymAddressKind, 
	addr1 : int, 
	addr2 : int, 
	addr3 : int, 
	startOffset : int, 
	endOffset : int
)
Not applicable.

Parameters

name

The local variable name.

attributes

The local variable attributes specified using the FieldAttributes enumerator.

signature

The local variable signature.

addrKind

The address types for addr1, addr2, and addr3 using SymAddressKind.

addr1

The first address for the local variable specification.

addr2

The second address for the local variable specification.

addr3

The third address for the local variable specification.

startOffset

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

endOffset

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

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, they fall 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.)

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft