CodeVariableDeclarationStatement 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 CodeVariableDeclarationStatement 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| CodeVariableDeclarationStatement() |
初始化 CodeVariableDeclarationStatement 類別的新執行個體。 |
| CodeVariableDeclarationStatement(CodeTypeReference, String) |
使用指定的類型和名稱初始化該類別的新實例 CodeVariableDeclarationStatement 。 |
| CodeVariableDeclarationStatement(String, String) |
使用指定的資料型別名稱與變數名稱初始化該類別的新實例 CodeVariableDeclarationStatement 。 |
| CodeVariableDeclarationStatement(Type, String) |
使用指定的資料型態和變數名稱初始化該類別的新實例 CodeVariableDeclarationStatement 。 |
| CodeVariableDeclarationStatement(CodeTypeReference, String, CodeExpression) |
使用指定的資料型態、變數名稱及初始化運算式初始化該類別的新實例 CodeVariableDeclarationStatement 。 |
| CodeVariableDeclarationStatement(String, String, CodeExpression) |
使用指定的資料型態、變數名稱及初始化運算式初始化該類別的新實例 CodeVariableDeclarationStatement 。 |
| CodeVariableDeclarationStatement(Type, String, CodeExpression) |
使用指定的資料型態、變數名稱及初始化運算式初始化該類別的新實例 CodeVariableDeclarationStatement 。 |
CodeVariableDeclarationStatement()
初始化 CodeVariableDeclarationStatement 類別的新執行個體。
public:
CodeVariableDeclarationStatement();
public CodeVariableDeclarationStatement();
Public Sub New ()
適用於
CodeVariableDeclarationStatement(CodeTypeReference, String)
使用指定的類型和名稱初始化該類別的新實例 CodeVariableDeclarationStatement 。
public:
CodeVariableDeclarationStatement(System::CodeDom::CodeTypeReference ^ type, System::String ^ name);
public CodeVariableDeclarationStatement(System.CodeDom.CodeTypeReference type, string name);
new System.CodeDom.CodeVariableDeclarationStatement : System.CodeDom.CodeTypeReference * string -> System.CodeDom.CodeVariableDeclarationStatement
Public Sub New (type As CodeTypeReference, name As String)
參數
- type
- CodeTypeReference
A CodeTypeReference 表示變數的資料型態。
- name
- String
變數的名稱。
適用於
CodeVariableDeclarationStatement(String, String)
使用指定的資料型別名稱與變數名稱初始化該類別的新實例 CodeVariableDeclarationStatement 。
public:
CodeVariableDeclarationStatement(System::String ^ type, System::String ^ name);
public CodeVariableDeclarationStatement(string type, string name);
new System.CodeDom.CodeVariableDeclarationStatement : string * string -> System.CodeDom.CodeVariableDeclarationStatement
Public Sub New (type As String, name As String)
參數
- type
- String
變數的資料型態名稱。
- name
- String
變數的名稱。
適用於
CodeVariableDeclarationStatement(Type, String)
使用指定的資料型態和變數名稱初始化該類別的新實例 CodeVariableDeclarationStatement 。
public:
CodeVariableDeclarationStatement(Type ^ type, System::String ^ name);
public CodeVariableDeclarationStatement(Type type, string name);
new System.CodeDom.CodeVariableDeclarationStatement : Type * string -> System.CodeDom.CodeVariableDeclarationStatement
Public Sub New (type As Type, name As String)
參數
- type
- Type
變數的資料型態。
- name
- String
變數的名稱。
適用於
CodeVariableDeclarationStatement(CodeTypeReference, String, CodeExpression)
使用指定的資料型態、變數名稱及初始化運算式初始化該類別的新實例 CodeVariableDeclarationStatement 。
public:
CodeVariableDeclarationStatement(System::CodeDom::CodeTypeReference ^ type, System::String ^ name, System::CodeDom::CodeExpression ^ initExpression);
public CodeVariableDeclarationStatement(System.CodeDom.CodeTypeReference type, string name, System.CodeDom.CodeExpression initExpression);
new System.CodeDom.CodeVariableDeclarationStatement : System.CodeDom.CodeTypeReference * string * System.CodeDom.CodeExpression -> System.CodeDom.CodeVariableDeclarationStatement
Public Sub New (type As CodeTypeReference, name As String, initExpression As CodeExpression)
參數
- type
- CodeTypeReference
A CodeTypeReference 表示變數的類型。
- name
- String
變數的名稱。
- initExpression
- CodeExpression
A CodeExpression 表示變數的初始化表達式。
另請參閱
適用於
CodeVariableDeclarationStatement(String, String, CodeExpression)
使用指定的資料型態、變數名稱及初始化運算式初始化該類別的新實例 CodeVariableDeclarationStatement 。
public:
CodeVariableDeclarationStatement(System::String ^ type, System::String ^ name, System::CodeDom::CodeExpression ^ initExpression);
public CodeVariableDeclarationStatement(string type, string name, System.CodeDom.CodeExpression initExpression);
new System.CodeDom.CodeVariableDeclarationStatement : string * string * System.CodeDom.CodeExpression -> System.CodeDom.CodeVariableDeclarationStatement
Public Sub New (type As String, name As String, initExpression As CodeExpression)
參數
- type
- String
變數的資料型態名稱。
- name
- String
變數的名稱。
- initExpression
- CodeExpression
A CodeExpression 表示變數的初始化表達式。
適用於
CodeVariableDeclarationStatement(Type, String, CodeExpression)
使用指定的資料型態、變數名稱及初始化運算式初始化該類別的新實例 CodeVariableDeclarationStatement 。
public:
CodeVariableDeclarationStatement(Type ^ type, System::String ^ name, System::CodeDom::CodeExpression ^ initExpression);
public CodeVariableDeclarationStatement(Type type, string name, System.CodeDom.CodeExpression initExpression);
new System.CodeDom.CodeVariableDeclarationStatement : Type * string * System.CodeDom.CodeExpression -> System.CodeDom.CodeVariableDeclarationStatement
Public Sub New (type As Type, name As String, initExpression As CodeExpression)
參數
- type
- Type
變數的資料型態。
- name
- String
變數的名稱。
- initExpression
- CodeExpression
A CodeExpression 表示變數的初始化表達式。