CodeTypeDeclarationCollection.AddRange Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Kopieert de elementen van de opgegeven matrix naar het einde van de verzameling.
Overloads
| Name | Description |
|---|---|
| AddRange(CodeTypeDeclaration[]) |
Kopieert de elementen van de opgegeven matrix naar het einde van de verzameling. |
| AddRange(CodeTypeDeclarationCollection) |
Hiermee wordt de inhoud van een ander CodeTypeDeclarationCollection object toegevoegd aan het einde van de verzameling. |
AddRange(CodeTypeDeclaration[])
Kopieert de elementen van de opgegeven matrix naar het einde van de verzameling.
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())
Parameters
- value
- CodeTypeDeclaration[]
Een matrix van het type CodeTypeDeclaration dat de objecten bevat die aan de verzameling moeten worden toegevoegd.
Uitzonderingen
value is null.
Voorbeelden
In het volgende voorbeeld ziet u hoe u de overbelasting van de AddRange(CodeTypeDeclaration[]) methode gebruikt om een matrix met CodeTypeDeclaration objecten toe te voegen aan een CodeTypeDeclarationCollection.
// 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)
Zie ook
Van toepassing op
AddRange(CodeTypeDeclarationCollection)
Hiermee wordt de inhoud van een ander CodeTypeDeclarationCollection object toegevoegd aan het einde van de verzameling.
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)
Parameters
Een CodeTypeDeclarationCollection object dat de objecten bevat die aan de verzameling moeten worden toegevoegd.
Uitzonderingen
value is null.
Voorbeelden
In het volgende voorbeeld ziet u hoe u de overbelasting van de AddRange(CodeTypeDeclarationCollection) methode gebruikt om objecten van het ene CodeTypeDeclarationCollection naar het andere CodeTypeDeclarationCollectiontoe te voegenCodeTypeDeclaration.
// 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)