System.CodeDom.CodeVariableDeclarationStatement Class

Represents a variable declaration.

See Also: CodeVariableDeclarationStatement Members

Syntax

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class CodeVariableDeclarationStatement : CodeStatement

Remarks

System.CodeDom.CodeVariableDeclarationStatement can be used to represent code that declares a variable.

The CodeVariableDeclarationStatement.Type property specifies the type of the variable to declare. The CodeVariableDeclarationStatement.Name property specifies the name of the variable to declare. The CodeVariableDeclarationStatement.InitExpression property is optional, and specifies an initialization expression to assign to the variable after it is created.

Note:

Some languages can implement the optional variable initialization expression by making a separate assignment statement after the variable declaration.

Requirements

Namespace: System.CodeDom
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0