CodeExpressionCollection.AddRange Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menyalin elemen array yang ditentukan ke akhir koleksi.
Overload
AddRange(CodeExpression[]) |
Menyalin elemen array yang ditentukan ke akhir koleksi. |
AddRange(CodeExpressionCollection) |
Menyalin isi objek lain CodeExpressionCollection ke akhir koleksi. |
AddRange(CodeExpression[])
- Sumber:
- CodeExpressionCollection.cs
- Sumber:
- CodeExpressionCollection.cs
- Sumber:
- CodeExpressionCollection.cs
Menyalin elemen array yang ditentukan ke akhir koleksi.
public:
void AddRange(cli::array <System::CodeDom::CodeExpression ^> ^ value);
public void AddRange (System.CodeDom.CodeExpression[] value);
member this.AddRange : System.CodeDom.CodeExpression[] -> unit
Public Sub AddRange (value As CodeExpression())
Parameter
- value
- CodeExpression[]
Array jenis CodeExpression yang berisi objek untuk ditambahkan ke koleksi.
Pengecualian
value
adalah null
.
Contoh
Contoh berikut menunjukkan cara menggunakan AddRange(CodeExpression[]) metode kelebihan beban untuk menambahkan anggota CodeExpression array ke CodeExpressionCollection.
// Adds an array of CodeExpression objects to the collection.
array<CodeExpression^>^expressions = {gcnew CodePrimitiveExpression( true ),gcnew CodePrimitiveExpression( true )};
collection->AddRange( expressions );
// Adds a collection of CodeExpression objects to the collection.
CodeExpressionCollection^ expressionsCollection = gcnew CodeExpressionCollection;
expressionsCollection->Add( gcnew CodePrimitiveExpression( true ) );
expressionsCollection->Add( gcnew CodePrimitiveExpression( true ) );
collection->AddRange( expressionsCollection );
// Adds an array of CodeExpression objects to the collection.
CodeExpression[] expressions = { new CodePrimitiveExpression(true), new CodePrimitiveExpression(true) };
collection.AddRange( expressions );
// Adds a collection of CodeExpression objects to the collection.
CodeExpressionCollection expressionsCollection = new CodeExpressionCollection();
expressionsCollection.Add( new CodePrimitiveExpression(true) );
expressionsCollection.Add( new CodePrimitiveExpression(true) );
collection.AddRange( expressionsCollection );
' Adds an array of CodeExpression objects to the collection.
Dim expressions As CodeExpression() = {New CodePrimitiveExpression(True), New CodePrimitiveExpression(True)}
collection.AddRange(expressions)
' Adds a collection of CodeExpression objects to the collection.
Dim expressionsCollection As New CodeExpressionCollection()
expressionsCollection.Add(New CodePrimitiveExpression(True))
expressionsCollection.Add(New CodePrimitiveExpression(True))
collection.AddRange(expressionsCollection)
Lihat juga
Berlaku untuk
AddRange(CodeExpressionCollection)
- Sumber:
- CodeExpressionCollection.cs
- Sumber:
- CodeExpressionCollection.cs
- Sumber:
- CodeExpressionCollection.cs
Menyalin isi objek lain CodeExpressionCollection ke akhir koleksi.
public:
void AddRange(System::CodeDom::CodeExpressionCollection ^ value);
public void AddRange (System.CodeDom.CodeExpressionCollection value);
member this.AddRange : System.CodeDom.CodeExpressionCollection -> unit
Public Sub AddRange (value As CodeExpressionCollection)
Parameter
- value
- CodeExpressionCollection
CodeExpressionCollection yang berisi objek untuk ditambahkan ke koleksi.
Pengecualian
value
adalah null
.
Contoh
Contoh berikut menunjukkan cara menggunakan AddRange(CodeExpressionCollection) metode kelebihan beban untuk menambahkan anggota satu CodeExpressionCollection objek ke objek lainnya CodeExpressionCollection.
// Adds an array of CodeExpression objects to the collection.
array<CodeExpression^>^expressions = {gcnew CodePrimitiveExpression( true ),gcnew CodePrimitiveExpression( true )};
collection->AddRange( expressions );
// Adds a collection of CodeExpression objects to the collection.
CodeExpressionCollection^ expressionsCollection = gcnew CodeExpressionCollection;
expressionsCollection->Add( gcnew CodePrimitiveExpression( true ) );
expressionsCollection->Add( gcnew CodePrimitiveExpression( true ) );
collection->AddRange( expressionsCollection );
// Adds an array of CodeExpression objects to the collection.
CodeExpression[] expressions = { new CodePrimitiveExpression(true), new CodePrimitiveExpression(true) };
collection.AddRange( expressions );
// Adds a collection of CodeExpression objects to the collection.
CodeExpressionCollection expressionsCollection = new CodeExpressionCollection();
expressionsCollection.Add( new CodePrimitiveExpression(true) );
expressionsCollection.Add( new CodePrimitiveExpression(true) );
collection.AddRange( expressionsCollection );
' Adds an array of CodeExpression objects to the collection.
Dim expressions As CodeExpression() = {New CodePrimitiveExpression(True), New CodePrimitiveExpression(True)}
collection.AddRange(expressions)
' Adds a collection of CodeExpression objects to the collection.
Dim expressionsCollection As New CodeExpressionCollection()
expressionsCollection.Add(New CodePrimitiveExpression(True))
expressionsCollection.Add(New CodePrimitiveExpression(True))
collection.AddRange(expressionsCollection)