ConcurrentQueue<T>.CopyTo(T[], Int32) Methode
Definition
Kopiert die ConcurrentQueue<T>-Elemente in ein vorhandenes eindimensionales Array, beginnend beim angegebenen Arrayindex.Copies the ConcurrentQueue<T> elements to an existing one-dimensional Array, starting at the specified array index.
public:
virtual void CopyTo(cli::array <T> ^ array, int index);
public void CopyTo (T[] array, int index);
abstract member CopyTo : 'T[] * int -> unit
override this.CopyTo : 'T[] * int -> unit
Public Sub CopyTo (array As T(), index As Integer)
Parameter
- array
- T[]
Das eindimensionale Array, das das Ziel der aus der ConcurrentQueue<T> kopierten Elemente ist.The one-dimensional Array that is the destination of the elements copied from the ConcurrentQueue<T>. Für das Array muss eine nullbasierte Indizierung verwendet werden.The Array must have zero-based indexing.
- index
- Int32
Der nullbasierte Index im array
, bei dem der Kopiervorgang beginnt.The zero-based index in array
at which copying begins.
Implementiert
Ausnahmen
array
ist ein NULL-Verweis (Nothing in Visual Basic).array
is a null reference (Nothing in Visual Basic).
index
ist kleiner als Null.index
is less than zero.
index
ist gleich oder größer als die Länge des array
-oder- die Anzahl der Elemente in der Quell-ConcurrentQueue<T> ist größer als der verfügbare Platz von index
bis zum Ende des Ziel-array
.index
is equal to or greater than the length of the array
-or- The number of elements in the source ConcurrentQueue<T> is greater than the available space from index
to the end of the destination array
.