HttpStaticObjectsCollection.CopyTo(Array, Int32) Method

Definition

Copies members of an HttpStaticObjectsCollection into an array.

C#
public void CopyTo(Array array, int index);

Parameters

array
Array

The array to copy the HttpStaticObjectsCollection into.

index
Int32

The member of the collection where copying starts.

Implements

Examples

The following example creates a new Object array of the required size and copies an existing StaticObjects collection into it.

C#
// Find the number of members in the StaticObjects collection.
int ObjCount = Application.StaticObjects.Count;
// Create an array of the same size.
Object[] MyObjArray = new Object[ObjCount];
// Copy the entire collection into the array.
Application.StaticObjects.CopyTo(MyObjArray, 0);

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1