HttpStaticObjectsCollection.CopyTo(Array, Int32) Método

Definición

Copia los miembros de en HttpStaticObjectsCollection una matriz.

public:
 virtual void CopyTo(Array ^ array, int index);
public void CopyTo(Array array, int index);
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
Public Sub CopyTo (array As Array, index As Integer)

Parámetros

array
Array

Matriz en la que se va a copiar .HttpStaticObjectsCollection

index
Int32

Miembro de la colección donde se inicia la copia.

Implementaciones

Ejemplos

En el ejemplo siguiente se crea una nueva Object matriz del tamaño necesario y se copia una colección existente StaticObjects en ella.

// 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);
' Find the number of members in the StaticObjects collection.
Dim ObjCount As Integer = Application.StaticObjects.Count
' Create an array of the same size.
Dim MyObjArray(ObjCount) As Object
' Copy the entire collection into the array.
Application.StaticObjects.CopyTo(MyObjArray, 0)

Se aplica a