CodeStatementCollection 建構函式

定義

初始化 CodeStatementCollection 類別的新執行個體。

多載

CodeStatementCollection()

初始化 CodeStatementCollection 類別的新執行個體。

CodeStatementCollection(CodeStatement[])

初始化 CodeStatementCollection 類別的新執行個體,這個執行個體包含 CodeStatement 物件的指定陣列。

CodeStatementCollection(CodeStatementCollection)

初始化 CodeStatementCollection 類別的新執行個體,這個執行個體包含指定之來源集合的元素。

CodeStatementCollection()

來源:
CodeStatementCollection.cs
來源:
CodeStatementCollection.cs
來源:
CodeStatementCollection.cs

初始化 CodeStatementCollection 類別的新執行個體。

C#
public CodeStatementCollection ();

範例

下列範例示範如何建立 類別的 CodeStatementCollection 空白實例。

C#
// Creates an empty CodeStatementCollection.
CodeStatementCollection collection = new CodeStatementCollection();

適用於

.NET Framework 4.8.1 和其他版本
產品 版本
.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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

CodeStatementCollection(CodeStatement[])

來源:
CodeStatementCollection.cs
來源:
CodeStatementCollection.cs
來源:
CodeStatementCollection.cs

初始化 CodeStatementCollection 類別的新執行個體,這個執行個體包含 CodeStatement 物件的指定陣列。

C#
public CodeStatementCollection (System.CodeDom.CodeStatement[] value);

參數

value
CodeStatement[]

用於初始化集合之 CodeStatement 物件的陣列。

例外狀況

valuenull

適用於

.NET Framework 4.8.1 和其他版本
產品 版本
.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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

CodeStatementCollection(CodeStatementCollection)

來源:
CodeStatementCollection.cs
來源:
CodeStatementCollection.cs
來源:
CodeStatementCollection.cs

初始化 CodeStatementCollection 類別的新執行個體,這個執行個體包含指定之來源集合的元素。

C#
public CodeStatementCollection (System.CodeDom.CodeStatementCollection value);

參數

value
CodeStatementCollection

用來初始化集合的 CodeStatementCollection 物件。

例外狀況

valuenull

適用於

.NET Framework 4.8.1 和其他版本
產品 版本
.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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9