CodeStatementCollection.Add メソッド

定義

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

オーバーロード

Add(CodeExpression)

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

Add(CodeStatement)

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

Add(CodeExpression)

ソース:
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

指定した 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( gcnew CodeCommentStatement( "Test comment statement" ) );
// 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"))

こちらもご覧ください

適用対象