System.Reflection.Emit.LocalBuilder�Class

Assembly: Mscorlib.dll
Namespace: System.Reflection.Emit
Summary
Represents a local variable within a method or constructor.
C# Syntax:
public sealed class LocalBuilder
Thread Safety
Reflection Emit is thread-safe when using assemblies that were created with the AppDomain.DefineDynamicAssembly method with the Boolean parameter isSynchronized set to true.
Remarks
A LocalBuilder object can be defined using the ILGenerator.DeclareLocal method.
See also:
System.Reflection.Emit Namespace

System.Reflection.Emit.LocalBuilder Member List:

Public�Properties
LocalType Read-only

Returns the type of the local variable.
Public�Methods
Equals
(inherited from�System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from�System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from�System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
SetLocalSymInfo Overloaded:
SetLocalSymInfo(string name)

Sets the name of this local variable.
SetLocalSymInfo Overloaded:
SetLocalSymInfo(string name, int startOffset, int endOffset)

Sets the name and lexical scope of this local variable.
ToString
(inherited from�System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected�Methods
Finalize
(inherited from�System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from�System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Reflection.Emit.LocalBuilder Member Details

Property: LocalType (read-only)
Summary
Returns the type of the local variable.
C# Syntax:
public Type�LocalType {get;}

Return to top


Method: Equals(
���objectobj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool�Equals(
���objectobj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~LocalBuilder();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int�GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type�GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object�MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Overloaded Method: SetLocalSymInfo(
���stringname
)
Summary
Sets the name of this local variable.
C# Syntax:
public void SetLocalSymInfo(
���stringname
);
Parameters:

name

The name of the local variable.

Exceptions
Exception Type Condition
InvalidOperationException The containing type has been created with TypeBuilder.CreateType.

-or-

There is no symbolic writer defined for the containing module.

Return to top


Overloaded Method: SetLocalSymInfo(
���stringname,
���intstartOffset,
���intendOffset
)
Summary
Sets the name and lexical scope of this local variable.
C# Syntax:
public void SetLocalSymInfo(
���stringname,
���intstartOffset,
���intendOffset
);
Parameters:

name

The name of the local variable.

startOffset

The beginning offset of the lexical scope of the local variable.

endOffset

The ending offset of the lexical scope of the local variable.

Exceptions
Exception Type Condition
InvalidOperationException The containing type has been created with TypeBuilder.CreateType.

-or-

There is no symbolic writer defined for the containing module.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.