NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Stack.CopyTo

Copies the Stack into an existing one-dimensional Array, starting at the specified array index.

[Visual Basic]
Overridable Public Sub CopyTo( _
   ByVal array As Array, _
   ByVal index As Integer _
)
[C#]
public virtual void CopyTo(
   Array array,
   int index
);
[C++]
public: virtual void CopyTo(
   Array* array,
   int index
);
[JScript]
public function CopyTo(
   array : Array,
   index : int
);

Parameters

array
The one-dimensional Array to paste the Stack elements into.
index
The starting index in array.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException index is less than the lowbound of array.
ArgumentException array is multidimensional.

-or-

The number of elements in the Stack is greater than the available space between index and the end of array.

Remarks

This method can be overridden by a derived class.

See Also

Stack Class | Stack Members | System.Collections Namespace | ToArray