CodeTypeReferenceCollection.AddRange Method (CodeTypeReferenceCollection)
.NET Framework 4.5
Adds the contents of the specified CodeTypeReferenceCollection to the end of the collection.
Namespace: System.CodeDom
Assembly: System (in System.dll)
Parameters
- value
- Type: System.CodeDom.CodeTypeReferenceCollection
A CodeTypeReferenceCollection containing the objects to add to the collection.
| Exception | Condition |
|---|---|
| ArgumentNullException | value is null. |
// Adds an array of CodeTypeReference objects to the collection. CodeTypeReference[] references = { new CodeTypeReference(typeof(bool)), new CodeTypeReference(typeof(bool)) }; collection.AddRange( references ); // Adds a collection of CodeTypeReference objects to the collection. CodeTypeReferenceCollection referencesCollection = new CodeTypeReferenceCollection(); referencesCollection.Add( new CodeTypeReference(typeof(bool)) ); referencesCollection.Add( new CodeTypeReference(typeof(bool)) ); collection.AddRange( referencesCollection );
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.