Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AddRange Method (CodeTypeReferenceCollection)
Collapse the table of content
Expand the table of content

CodeTypeReferenceCollection.AddRange Method (CodeTypeReferenceCollection)

Adds the contents of the specified CodeTypeReferenceCollection to the end of the collection.

Namespace:  System.CodeDom
Assembly:  System (in System.dll)

public void AddRange(
	CodeTypeReferenceCollection value
)

Parameters

value
Type: System.CodeDom.CodeTypeReferenceCollection

A CodeTypeReferenceCollection containing the objects to add to the collection.

ExceptionCondition
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 );

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft