
public virtual void
CopyTo(Array array, int index);
Copies the System.Collections.Stack to an existing one-dimensional System.Array, starting at the specified array index.
Полное описание ... Parameters:
array:
The one-dimensional System.Array that is the destination of the elements
copied from System.Collections.Stack. The System.Array must have zero-based
indexing.
index:
The zero-based index in array at which copying begins.
Exceptions:
System.ArgumentNullException:
array is null.
System.ArgumentOutOfRangeException:
index is less than zero.
System.ArgumentException:
array is multidimensional.-or- The number of elements in the source System.Collections.Stack
is greater than the available space from index to the end of the destination
array.
System.InvalidCastException:
The type of the source System.Collections.Stack cannot be cast automatically
to the type of the destination array.