Method CopyTo
CopyTo(Node<TNodeValue, TEdgeLabel>[])
Copies all the nodes in the directed graph to a compatible one-dimensional array, starting at the beginning of the target array.
public void CopyTo(Node<TNodeValue, TEdgeLabel>[] array)
Parameters
array
Node<TNodeValue, TEdgeLabel>[]The one-dimensional array that is the destination of the nodes copied from the directed graph.
Exceptions
- ArgumentNullException
array
is null.- ArgumentException
The number of nodes in the directed graph is greater than the number of elements that the destination array can contain.
CopyTo(Node<TNodeValue, TEdgeLabel>[], int)
Copies all the nodes in the directed graph to a compatible one-dimensional array, starting at the specified index of the target array.
public void CopyTo(Node<TNodeValue, TEdgeLabel>[] array, int arrayIndex)
Parameters
array
Node<TNodeValue, TEdgeLabel>[]The one-dimensional array that is the destination of the nodes copied from the directed graph.
arrayIndex
intThe zero-based index in the array at which copying begins.
Exceptions
- ArgumentNullException
array
is null.- ArgumentOutOfRangeException
arrayIndex
is less than 0.- ArgumentException
The number of nodes in the directed graph is greater than the available space from
arrayIndex
to the end of the destination array.