CodeTypeReferenceCollection.AddRange Method (CodeTypeReference[])

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Copies the elements of the specified CodeTypeReference array to the end of the collection.

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

public void AddRange(
	CodeTypeReference[] value
)

Parameters

value
Type: System.CodeDom.CodeTypeReference[]

An array of type CodeTypeReference 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 );

.NET Framework
Available since 1.1
Return to top
Show: