ILGenerator.UsingNamespace Method (String)

 

Specifies the namespace to be used in evaluating locals and watches for the current active lexical scope.

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

public virtual void UsingNamespace(
	string usingNamespace
)

Parameters

usingNamespace
Type: System.String

The namespace to be used in evaluating locals and watches for the current active lexical scope

Exception Condition
ArgumentException

Length of usingNamespace is zero.

ArgumentNullException

usingNamespace is null.

NotSupportedException

This ILGenerator belongs to a DynamicMethod.

If the current ILGenerator is associated with a DynamicMethod object, this method is not 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: