CodeTypeReferenceCollection.CopyTo(CodeTypeReference[], Int32) Metod

Definition

Kopierar objekten i samlingen till den angivna endimensionella Array vid det angivna indexet.

public:
 void CopyTo(cli::array <System::CodeDom::CodeTypeReference ^> ^ array, int index);
public void CopyTo(System.CodeDom.CodeTypeReference[] array, int index);
member this.CopyTo : System.CodeDom.CodeTypeReference[] * int -> unit
Public Sub CopyTo (array As CodeTypeReference(), index As Integer)

Parametrar

array
CodeTypeReference[]

Den endimensionella Array som är målet för de värden som kopieras från samlingen.

index
Int32

Indexet för matrisen som ska börja infogas.

Undantag

Parametern array är flerdimensionell.

-eller-

Antalet element i CodeTypeReferenceCollection är större än det tillgängliga utrymmet mellan indexet för målmatrisen som anges av parametern index och slutet av målmatrisen.

Parametern array är null.

Parametern index är mindre än målmatrisens minsta index.

Exempel

// Copies the contents of the collection, beginning at index 0,
// to the specified CodeTypeReference array.
// 'references' is a CodeTypeReference array.
collection.CopyTo( references, 0 );
' Copies the contents of the collection, beginning at index 0, 
' to the specified CodeTypeReference array.
' 'references' is a CodeTypeReference array.
collection.CopyTo(references, 0)

Gäller för

Se även