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!

ICodeSourceFile.CreateLocalVariableStatement (ICodeClass, String, Object)

Constructs a local variable statement. This represents the declaration of a variable inside of a method.

[Visual Basic]
Overloads Function CreateLocalVariableStatement( _
   ByVal type As ICodeClass, _
   ByVal name As String, _
   ByVal value As Object _
) As ICodeLocalVariableStatement
[C#]
ICodeLocalVariableStatement CreateLocalVariableStatement(
   ICodeClass type,
   string name,
   object value
);
[C++]
ICodeLocalVariableStatement* CreateLocalVariableStatement(
   ICodeClass* type,
   String* name,
   Object* value
) = 0;
[JScript]
function CreateLocalVariableStatement(
   type : ICodeClass,
   name : String,
   value : Object
) : ICodeLocalVariableStatement;

Parameters

type
The data type of the variable to create.
name
The name to give the object.
value
The value to initialize the object with. Passing a null reference (in Visual Basic Nothing) as the value will result in no initialization. This can either be a variant for a specific value, or an object that implements one of the expression interfaces.

Return Value

The newly created local variable statement.

See Also

ICodeSourceFile Interface | ICodeSourceFile Members | System.ComponentModel.Design.CodeModel Namespace | ICodeSourceFile.CreateLocalVariableStatement Overload List | ICodeArrayCreateExpression | ICodeObjectCreateExpression | ICodeMethodInvokeExpression | ICodeNameReferenceExpression