ConcurrentStack<T>.CopyTo(T[], Int32) Método
Definición
Copia los elementos de ConcurrentStack<T> en una Array unidimensional existente, a partir del índice especificado de la matriz.Copies the ConcurrentStack<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)
Parámetros
- array
- T[]
Matriz Array unidimensional que constituye el destino de los elementos copiados desde la colección ConcurrentStack<T>.The one-dimensional Array that is the destination of the elements copied from the ConcurrentStack<T>. Array debe tener una indización de base cero.The Array must have zero-based indexing.
- index
- Int32
Índice de base cero en la array
donde comienza la copia.The zero-based index in array
at which copying begins.
Implementaciones
Excepciones
array
es una referencia nula (nada en Visual Basic).array
is a null reference (Nothing in Visual Basic).
index
es menor que cero.index
is less than zero.
index
es igual o mayor que la longitud de la matriz array
-o bien- el número de elementos de la colección ConcurrentStack<T> de origen es mayor que el espacio disponible desde index
hasta el final del parámetro array
de destino.index
is equal to or greater than the length of the array
-or- The number of elements in the source ConcurrentStack<T> is greater than the available space from index
to the end of the destination array
.