CodeStatementCollection 建構函式
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 CodeStatementCollection 類別的新執行個體。
CodeStatementCollection() |
初始化 CodeStatementCollection 類別的新執行個體。 |
CodeStatementCollection(CodeStatement[]) |
初始化 CodeStatementCollection 類別的新執行個體,這個執行個體包含 CodeStatement 物件的指定陣列。 |
CodeStatementCollection(CodeStatementCollection) |
初始化 CodeStatementCollection 類別的新執行個體,這個執行個體包含指定之來源集合的元素。 |
初始化 CodeStatementCollection 類別的新執行個體。
public:
CodeStatementCollection();
C#
public CodeStatementCollection ();
Public Sub New ()
範例
下列範例示範如何建立 類別的 CodeStatementCollection 空白實例。
// Creates an empty CodeStatementCollection.
CodeStatementCollection^ collection = gcnew CodeStatementCollection;
C#
// Creates an empty CodeStatementCollection.
CodeStatementCollection collection = new CodeStatementCollection();
' Creates an empty CodeStatementCollection.
Dim collection As 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 物件的指定陣列。
public:
CodeStatementCollection(cli::array <System::CodeDom::CodeStatement ^> ^ value);
C#
public CodeStatementCollection (System.CodeDom.CodeStatement[] value);
new System.CodeDom.CodeStatementCollection : System.CodeDom.CodeStatement[] -> System.CodeDom.CodeStatementCollection
Public Sub New (value As CodeStatement())
參數
- value
- CodeStatement[]
用於初始化集合之 CodeStatement 物件的陣列。
例外狀況
value
為 null
。
適用於
.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 類別的新執行個體,這個執行個體包含指定之來源集合的元素。
public:
CodeStatementCollection(System::CodeDom::CodeStatementCollection ^ value);
C#
public CodeStatementCollection (System.CodeDom.CodeStatementCollection value);
new System.CodeDom.CodeStatementCollection : System.CodeDom.CodeStatementCollection -> System.CodeDom.CodeStatementCollection
Public Sub New (value As CodeStatementCollection)
參數
- value
- CodeStatementCollection
用來初始化集合的 CodeStatementCollection 物件。
例外狀況
value
為 null
。
適用於
.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 |