CodeStatementCollection 构造函数

定义

初始化 CodeStatementCollection 类的新实例。Initializes a new instance of the CodeStatementCollection class.

重载

CodeStatementCollection()

初始化 CodeStatementCollection 类的新实例。Initializes a new instance of the CodeStatementCollection class.

CodeStatementCollection(CodeStatement[])

初始化 CodeStatementCollection 类的新实例,该实例包含 CodeStatement 对象的指定数组。Initializes a new instance of the CodeStatementCollection class that contains the specified array of CodeStatement objects.

CodeStatementCollection(CodeStatementCollection)

初始化 CodeStatementCollection 类的新实例,该实例包含指定源集合的元素。Initializes a new instance of the CodeStatementCollection class that contains the elements of the specified source collection.

CodeStatementCollection()

初始化 CodeStatementCollection 类的新实例。Initializes a new instance of the CodeStatementCollection class.

public:
 CodeStatementCollection();
public CodeStatementCollection ();
Public Sub New ()

示例

下面的示例演示如何创建类的空实例 CodeStatementCollectionThe following example shows how to create an empty instance of the CodeStatementCollection class.

// Creates an empty CodeStatementCollection.
CodeStatementCollection^ collection = gcnew CodeStatementCollection;
// Creates an empty CodeStatementCollection.
CodeStatementCollection collection = new CodeStatementCollection();
' Creates an empty CodeStatementCollection.
Dim collection As New CodeStatementCollection

CodeStatementCollection(CodeStatement[])

初始化 CodeStatementCollection 类的新实例,该实例包含 CodeStatement 对象的指定数组。Initializes a new instance of the CodeStatementCollection class that contains the specified array of CodeStatement objects.

public:
 CodeStatementCollection(cli::array <System::CodeDom::CodeStatement ^> ^ value);
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 对象数组。An array of CodeStatement objects with which to initialize the collection.

例外

valuenullvalue is null.

CodeStatementCollection(CodeStatementCollection)

初始化 CodeStatementCollection 类的新实例,该实例包含指定源集合的元素。Initializes a new instance of the CodeStatementCollection class that contains the elements of the specified source collection.

public:
 CodeStatementCollection(System::CodeDom::CodeStatementCollection ^ value);
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 对象,用来初始化集合。A CodeStatementCollection object with which to initialize the collection.

例外

valuenullvalue is null.

适用于