SiteMapNodeCollection.CopyTo Method (SiteMapNode[], Int32)

 

Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public virtual void CopyTo(
	SiteMapNode[] array,
	int index
)

Parameters

array
Type: System.Web.SiteMapNode[]

The one-dimensional array that must have zero-based indexing and is the destination of the elements copied from the SiteMapNodeCollection.

index
Type: System.Int32

The zero-based index in array at which copying begins.

Exception Condition
ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than zero.

ArgumentException

array is multidimensional.

-or-

The number of SiteMapNode objects in the source SiteMapNodeCollection is greater than the available space from index to the end of array.

The CopyTo method delegates to the CollectionBase.List property, which accounts for the possible exceptions that are listed in "Exceptions."

.NET Framework
Available since 2.0
Return to top
Show: