Partager via


LocalBuilder.SetLocalSymInfo Method (String, Int32, Int32)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Sets the name and lexical scope of this local variable.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Sub SetLocalSymInfo ( _
    name As String, _
    startOffset As Integer, _
    endOffset As Integer _
)
public void SetLocalSymInfo(
    string name,
    int startOffset,
    int endOffset
)

Parameters

  • startOffset
    Type: System.Int32
    The beginning offset of the lexical scope of the local variable.
  • endOffset
    Type: System.Int32
    The ending offset of the lexical scope of the local variable.

Exceptions

Exception Condition
InvalidOperationException

The containing type has been created with CreateType.

-or-

There is no symbolic writer defined for the containing module.

NotSupportedException

This local is defined in a dynamic method, rather than in a method of a dynamic type.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.