CodeAttributeArgumentCollection.AddRange メソッド

定義

指定した CodeAttributeArgument 配列の要素をコレクションの末尾にコピーします。

オーバーロード

名前 説明
AddRange(CodeAttributeArgument[])

指定した CodeAttributeArgument 配列の要素をコレクションの末尾にコピーします。

AddRange(CodeAttributeArgumentCollection)

別の CodeAttributeArgumentCollection オブジェクトの内容をコレクションの末尾にコピーします。

AddRange(CodeAttributeArgument[])

ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs

指定した CodeAttributeArgument 配列の要素をコレクションの末尾にコピーします。

public:
 void AddRange(cli::array <System::CodeDom::CodeAttributeArgument ^> ^ value);
public void AddRange(System.CodeDom.CodeAttributeArgument[] value);
member this.AddRange : System.CodeDom.CodeAttributeArgument[] -> unit
Public Sub AddRange (value As CodeAttributeArgument())

パラメーター

value
CodeAttributeArgument[]

コレクションに追加するオブジェクトを含む CodeAttributeArgument 型の配列。

例外

valuenullです。

次の例では、 AddRange(CodeAttributeArgument[]) メソッドのオーバーロードを使用して、 CodeAttributeArgument 配列のメンバーを CodeAttributeArgumentCollectionに追加する方法を示します。

// Adds an array of CodeAttributeArgument objects to the collection.
CodeAttributeArgument[] arguments = { new CodeAttributeArgument(), new CodeAttributeArgument() };
collection.AddRange( arguments );

// Adds a collection of CodeAttributeArgument objects to
// the collection.
CodeAttributeArgumentCollection argumentsCollection = new CodeAttributeArgumentCollection();
argumentsCollection.Add( new CodeAttributeArgument("TestBooleanArgument", new CodePrimitiveExpression(true)) );
argumentsCollection.Add( new CodeAttributeArgument("TestIntArgument", new CodePrimitiveExpression(1)) );
collection.AddRange( argumentsCollection );
' Adds an array of CodeAttributeArgument objects to the collection.
Dim arguments As CodeAttributeArgument() = {New CodeAttributeArgument(), New CodeAttributeArgument()}
collection.AddRange(arguments)

' Adds a collection of CodeAttributeArgument objects to the collection.
Dim argumentsCollection As New CodeAttributeArgumentCollection()
argumentsCollection.Add(New CodeAttributeArgument("TestBooleanArgument", New CodePrimitiveExpression(True)))
argumentsCollection.Add(New CodeAttributeArgument("TestIntArgument", New CodePrimitiveExpression(1)))
collection.AddRange(argumentsCollection)

こちらもご覧ください

適用対象

AddRange(CodeAttributeArgumentCollection)

ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs
ソース:
CodeAttributeArgumentCollection.cs

別の CodeAttributeArgumentCollection オブジェクトの内容をコレクションの末尾にコピーします。

public:
 void AddRange(System::CodeDom::CodeAttributeArgumentCollection ^ value);
public void AddRange(System.CodeDom.CodeAttributeArgumentCollection value);
member this.AddRange : System.CodeDom.CodeAttributeArgumentCollection -> unit
Public Sub AddRange (value As CodeAttributeArgumentCollection)

パラメーター

value
CodeAttributeArgumentCollection

コレクションに追加するオブジェクトを含む CodeAttributeArgumentCollection

例外

valuenullです。

次の例では、 AddRange(CodeAttributeArgumentCollection) メソッドオーバーロードを使用して、1 つの CodeAttributeArgumentCollection オブジェクトのメンバーを別の CodeAttributeArgumentCollectionに追加する方法を示します。

// Adds an array of CodeAttributeArgument objects to the collection.
CodeAttributeArgument[] arguments = { new CodeAttributeArgument(), new CodeAttributeArgument() };
collection.AddRange( arguments );

// Adds a collection of CodeAttributeArgument objects to
// the collection.
CodeAttributeArgumentCollection argumentsCollection = new CodeAttributeArgumentCollection();
argumentsCollection.Add( new CodeAttributeArgument("TestBooleanArgument", new CodePrimitiveExpression(true)) );
argumentsCollection.Add( new CodeAttributeArgument("TestIntArgument", new CodePrimitiveExpression(1)) );
collection.AddRange( argumentsCollection );
' Adds an array of CodeAttributeArgument objects to the collection.
Dim arguments As CodeAttributeArgument() = {New CodeAttributeArgument(), New CodeAttributeArgument()}
collection.AddRange(arguments)

' Adds a collection of CodeAttributeArgument objects to the collection.
Dim argumentsCollection As New CodeAttributeArgumentCollection()
argumentsCollection.Add(New CodeAttributeArgument("TestBooleanArgument", New CodePrimitiveExpression(True)))
argumentsCollection.Add(New CodeAttributeArgument("TestIntArgument", New CodePrimitiveExpression(1)))
collection.AddRange(argumentsCollection)

こちらもご覧ください

適用対象