HttpStaticObjectsCollection.CopyTo Method
.NET Framework 2.0
Copies members of an HttpStaticObjectsCollection into an array.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public final void CopyTo ( Array array, int index )
public final function CopyTo ( array : Array, index : int )
Parameters
- array
The array to copy the HttpStaticObjectsCollection into.
- index
The member of the collection where copying starts.
The following example creates a new Object array of the required size and copies an existing StaticObjects collection into it.
// Find the number of members in the StaticObjects collection.
int objCount = get_Application().get_StaticObjects().get_Count();
// Create an array of the same size.
Array myObjArray =
Array.CreateInstance(Type.GetType("System.Object"), objCount);
// Copy the entire collection into the array.
get_Application().get_StaticObjects().CopyTo(myObjArray,0);
// Find the number of members in the StaticObjects collection. var objCount : int = Application.StaticObjects.Count // Create an array of the same size. var myObjArray : System.Array = System.Array.CreateInstance(System.Object, objCount) // Copy the entire collection into the array. Application.StaticObjects.CopyTo(myObjArray, 0)
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: