CodeTypeDeclarationCollection.AddRange Yöntem

Tanım

Belirtilen dizinin öğelerini koleksiyonun sonuna kopyalar.

Aşırı Yüklemeler

AddRange(CodeTypeDeclaration[])

Belirtilen dizinin öğelerini koleksiyonun sonuna kopyalar.

AddRange(CodeTypeDeclarationCollection)

Başka bir CodeTypeDeclarationCollection nesnenin içeriğini koleksiyonun sonuna ekler.

AddRange(CodeTypeDeclaration[])

Kaynak:
CodeTypeDeclarationCollection.cs
Kaynak:
CodeTypeDeclarationCollection.cs
Kaynak:
CodeTypeDeclarationCollection.cs

Belirtilen dizinin öğelerini koleksiyonun sonuna kopyalar.

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

Parametreler

value
CodeTypeDeclaration[]

Koleksiyona eklenecek nesneleri içeren tür CodeTypeDeclaration dizisi.

Özel durumlar

value, null değeridir.

Örnekler

Aşağıdaki örnekte yöntemi aşırı yüklemesinin AddRange(CodeTypeDeclaration[]) bir nesnesi CodeTypeDeclarationCollectiondizisi eklemek için nasıl kullanılacağı gösterilmektedirCodeTypeDeclaration.

// Adds an array of CodeTypeDeclaration objects to the collection.
array<CodeTypeDeclaration^>^declarations = {gcnew CodeTypeDeclaration( "TestType1" ),gcnew CodeTypeDeclaration( "TestType2" )};
collection->AddRange( declarations );

// Adds a collection of CodeTypeDeclaration objects to the 
// collection.
CodeTypeDeclarationCollection^ declarationsCollection = gcnew CodeTypeDeclarationCollection;
declarationsCollection->Add( gcnew CodeTypeDeclaration( "TestType1" ) );
declarationsCollection->Add( gcnew CodeTypeDeclaration( "TestType2" ) );
collection->AddRange( declarationsCollection );
// Adds an array of CodeTypeDeclaration objects to the collection.
CodeTypeDeclaration[] declarations = { new CodeTypeDeclaration("TestType1"), new CodeTypeDeclaration("TestType2") };
collection.AddRange( declarations );

// Adds a collection of CodeTypeDeclaration objects to the
// collection.
CodeTypeDeclarationCollection declarationsCollection = new CodeTypeDeclarationCollection();
declarationsCollection.Add( new CodeTypeDeclaration("TestType1") );
declarationsCollection.Add( new CodeTypeDeclaration("TestType2") );
collection.AddRange( declarationsCollection );
' Adds an array of CodeTypeDeclaration objects to the 
' collection.
Dim declarations As CodeTypeDeclaration() = {New CodeTypeDeclaration("TestType1"), New CodeTypeDeclaration("TestType2")}
collection.AddRange(declarations)

' Adds a collection of CodeTypeDeclaration objects to the collection.
Dim declarationsCollection As New CodeTypeDeclarationCollection()
declarationsCollection.Add(New CodeTypeDeclaration("TestType1"))
declarationsCollection.Add(New CodeTypeDeclaration("TestType2"))
collection.AddRange(declarationsCollection)

Ayrıca bkz.

Şunlara uygulanır

AddRange(CodeTypeDeclarationCollection)

Kaynak:
CodeTypeDeclarationCollection.cs
Kaynak:
CodeTypeDeclarationCollection.cs
Kaynak:
CodeTypeDeclarationCollection.cs

Başka bir CodeTypeDeclarationCollection nesnenin içeriğini koleksiyonun sonuna ekler.

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

Parametreler

value
CodeTypeDeclarationCollection

CodeTypeDeclarationCollection Koleksiyona eklenecek nesneleri içeren bir nesne.

Özel durumlar

value, null değeridir.

Örnekler

Aşağıdaki örnekte yöntem aşırı yüklemesinin AddRange(CodeTypeDeclarationCollection) bir nesneden diğerine CodeTypeDeclarationCollection nasıl ekleneceği CodeTypeDeclaration gösterilmektedirCodeTypeDeclarationCollection.

// Adds an array of CodeTypeDeclaration objects to the collection.
array<CodeTypeDeclaration^>^declarations = {gcnew CodeTypeDeclaration( "TestType1" ),gcnew CodeTypeDeclaration( "TestType2" )};
collection->AddRange( declarations );

// Adds a collection of CodeTypeDeclaration objects to the 
// collection.
CodeTypeDeclarationCollection^ declarationsCollection = gcnew CodeTypeDeclarationCollection;
declarationsCollection->Add( gcnew CodeTypeDeclaration( "TestType1" ) );
declarationsCollection->Add( gcnew CodeTypeDeclaration( "TestType2" ) );
collection->AddRange( declarationsCollection );
// Adds an array of CodeTypeDeclaration objects to the collection.
CodeTypeDeclaration[] declarations = { new CodeTypeDeclaration("TestType1"), new CodeTypeDeclaration("TestType2") };
collection.AddRange( declarations );

// Adds a collection of CodeTypeDeclaration objects to the
// collection.
CodeTypeDeclarationCollection declarationsCollection = new CodeTypeDeclarationCollection();
declarationsCollection.Add( new CodeTypeDeclaration("TestType1") );
declarationsCollection.Add( new CodeTypeDeclaration("TestType2") );
collection.AddRange( declarationsCollection );
' Adds an array of CodeTypeDeclaration objects to the 
' collection.
Dim declarations As CodeTypeDeclaration() = {New CodeTypeDeclaration("TestType1"), New CodeTypeDeclaration("TestType2")}
collection.AddRange(declarations)

' Adds a collection of CodeTypeDeclaration objects to the collection.
Dim declarationsCollection As New CodeTypeDeclarationCollection()
declarationsCollection.Add(New CodeTypeDeclaration("TestType1"))
declarationsCollection.Add(New CodeTypeDeclaration("TestType2"))
collection.AddRange(declarationsCollection)

Ayrıca bkz.

Şunlara uygulanır