CodeAttributeArgumentCollection.AddRange Metode

Definisi

Menyalin elemen array yang ditentukan CodeAttributeArgument ke akhir koleksi.

Overload

Nama Deskripsi
AddRange(CodeAttributeArgument[])

Menyalin elemen array yang ditentukan CodeAttributeArgument ke akhir koleksi.

AddRange(CodeAttributeArgumentCollection)

Menyalin isi objek lain CodeAttributeArgumentCollection ke akhir koleksi.

AddRange(CodeAttributeArgument[])

Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs

Menyalin elemen array yang ditentukan CodeAttributeArgument ke akhir koleksi.

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())

Parameter

value
CodeAttributeArgument[]

Array jenis CodeAttributeArgument yang berisi objek yang akan ditambahkan ke koleksi.

Pengecualian

value adalah null.

Contoh

Contoh berikut menunjukkan cara menggunakan AddRange(CodeAttributeArgument[]) metode kelebihan beban untuk menambahkan anggota CodeAttributeArgument array ke 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)

Lihat juga

Berlaku untuk

AddRange(CodeAttributeArgumentCollection)

Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs
Sumber:
CodeAttributeArgumentCollection.cs

Menyalin isi objek lain CodeAttributeArgumentCollection ke akhir koleksi.

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)

Parameter

value
CodeAttributeArgumentCollection

Yang CodeAttributeArgumentCollection berisi objek untuk ditambahkan ke koleksi.

Pengecualian

value adalah null.

Contoh

Contoh berikut menunjukkan cara menggunakan AddRange(CodeAttributeArgumentCollection) metode kelebihan beban untuk menambahkan anggota satu CodeAttributeArgumentCollection objek ke objek lain 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)

Lihat juga

Berlaku untuk