CodeVariableDeclarationStatement Constructors

Definition

Initializes a new instance of the CodeVariableDeclarationStatement class.

Overloads

CodeVariableDeclarationStatement()

Initializes a new instance of the CodeVariableDeclarationStatement class.

CodeVariableDeclarationStatement(CodeTypeReference, String)

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified type and name.

CodeVariableDeclarationStatement(String, String)

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type name and variable name.

CodeVariableDeclarationStatement(Type, String)

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type and variable name.

CodeVariableDeclarationStatement(CodeTypeReference, String, CodeExpression)

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type, variable name, and initialization expression.

CodeVariableDeclarationStatement(String, String, CodeExpression)

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type, variable name, and initialization expression.

CodeVariableDeclarationStatement(Type, String, CodeExpression)

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type, variable name, and initialization expression.

CodeVariableDeclarationStatement()

Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs

Initializes a new instance of the CodeVariableDeclarationStatement class.

C#
public CodeVariableDeclarationStatement();

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeVariableDeclarationStatement(CodeTypeReference, String)

Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified type and name.

C#
public CodeVariableDeclarationStatement(System.CodeDom.CodeTypeReference type, string name);

Parameters

type
CodeTypeReference

A CodeTypeReference that indicates the data type of the variable.

name
String

The name of the variable.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeVariableDeclarationStatement(String, String)

Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type name and variable name.

C#
public CodeVariableDeclarationStatement(string type, string name);

Parameters

type
String

The name of the data type of the variable.

name
String

The name of the variable.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeVariableDeclarationStatement(Type, String)

Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type and variable name.

C#
public CodeVariableDeclarationStatement(Type type, string name);

Parameters

type
Type

The data type for the variable.

name
String

The name of the variable.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeVariableDeclarationStatement(CodeTypeReference, String, CodeExpression)

Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type, variable name, and initialization expression.

C#
public CodeVariableDeclarationStatement(System.CodeDom.CodeTypeReference type, string name, System.CodeDom.CodeExpression initExpression);

Parameters

type
CodeTypeReference

A CodeTypeReference that indicates the type of the variable.

name
String

The name of the variable.

initExpression
CodeExpression

A CodeExpression that indicates the initialization expression for the variable.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeVariableDeclarationStatement(String, String, CodeExpression)

Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type, variable name, and initialization expression.

C#
public CodeVariableDeclarationStatement(string type, string name, System.CodeDom.CodeExpression initExpression);

Parameters

type
String

The name of the data type of the variable.

name
String

The name of the variable.

initExpression
CodeExpression

A CodeExpression that indicates the initialization expression for the variable.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeVariableDeclarationStatement(Type, String, CodeExpression)

Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs
Source:
CodeVariableDeclarationStatement.cs

Initializes a new instance of the CodeVariableDeclarationStatement class using the specified data type, variable name, and initialization expression.

C#
public CodeVariableDeclarationStatement(Type type, string name, System.CodeDom.CodeExpression initExpression);

Parameters

type
Type

The data type of the variable.

name
String

The name of the variable.

initExpression
CodeExpression

A CodeExpression that indicates the initialization expression for the variable.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10