NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ILGenerator.DeclareLocal

Declares a local variable.

[Visual Basic]
Public Function DeclareLocal( _
   ByVal localType As Type _
) As LocalBuilder
[C#]
public LocalBuilder DeclareLocal(
   Type localType
);
[C++]
public: LocalBuilder* DeclareLocal(
   Type* localType
);
[JScript]
public function DeclareLocal(
   localType : Type
) : LocalBuilder;

Parameters

localType
The Type of the local variable.

Return Value

The declared local variable.

Exceptions

Exception Type Condition
ArgumentNullException if localType is a null reference (in Visual Basic Nothing)
InvalidOperationException if the containing type has been created with CreateType.

See Also

ILGenerator Class | ILGenerator Members | System.Reflection.Emit Namespace