HttpFileCollection.CopyTo(Array, Int32) Metodo

Definizione

Copia i membri della raccolta file in un elemento Array a partire dall'indice specificato della matrice.

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

Parametri

dest
Array

Array di destinazione.

index
Int32

Indice della matrice di destinazione in cui ha inizio la copia.

Esempio

Nell'esempio seguente viene copiata l'intera raccolta di file in un nuovo Array oggetto.

// Create the one-dimensional target array.
 // Dimension it large enough to hold the files collection.
 Array MyArray = Array.CreateInstance( typeof(String), Request.Files.Count );

 // Copy the entire collection to the array.
 Request.Files.CopyTo( MyArray, 0 );
' Create the one-dimensional target array.
 ' Dimension it large enough to hold the files collection.
 Dim MyArray As Array = Array.CreateInstance(GetType(String), Request.Files.Count)
 
 ' Copy the entire collection to the array.
 Request.Files.CopyTo(MyArray, 0)

Si applica a

Vedi anche