CodeStatementCollection.Add メソッド

定義

指定した CodeStatement をコレクションに追加します。

オーバーロード

名前 説明
Add(CodeExpression)

指定した CodeExpression オブジェクトをコレクションに追加します。

Add(CodeStatement)

指定した CodeStatement オブジェクトをコレクションに追加します。

Add(CodeExpression)

ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs

指定した CodeExpression オブジェクトをコレクションに追加します。

public:
 int Add(System::CodeDom::CodeExpression ^ value);
public int Add(System.CodeDom.CodeExpression value);
member this.Add : System.CodeDom.CodeExpression -> int
Public Function Add (value As CodeExpression) As Integer

パラメーター

value
CodeExpression

追加する CodeExpression オブジェクト。

返品

新しい要素が挿入されたインデックス。

こちらもご覧ください

適用対象

Add(CodeStatement)

ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs
ソース:
CodeStatementCollection.cs

指定した CodeStatement オブジェクトをコレクションに追加します。

public:
 int Add(System::CodeDom::CodeStatement ^ value);
public int Add(System.CodeDom.CodeStatement value);
member this.Add : System.CodeDom.CodeStatement -> int
Public Function Add (value As CodeStatement) As Integer

パラメーター

value
CodeStatement

追加する CodeStatement オブジェクト。

返品

新しい要素が挿入されたインデックス。

次の例では、 CodeStatement オブジェクトを CodeStatementCollection インスタンスに追加する方法を示します。

// Adds a CodeStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment statement") );
' Adds a CodeStatement to the collection.
collection.Add(New CodeCommentStatement("Test comment statement"))

こちらもご覧ください

適用対象