ILGenerator.BeginScope Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Begins a lexical scope.

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

abstract BeginScope : unit -> unit
override BeginScope : unit -> unit

Exception Condition
NotSupportedException

This ILGenerator belongs to a DynamicMethod.

This method is used to emit symbolic information. Local variables declared after BeginScope are scoped until the corresponding EndScope is called.

If the current ILGenerator is associated with a DynamicMethod object, it does not support symbolic information.

The following code sample illustrates the use of BeginScope and EndScope.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show: