UsingNamespace Method

ILGenerator.UsingNamespace Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

ExceptionCondition
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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft