SiteMapNodeCollection.CopyTo(SiteMapNode[], Int32) Method

Definition

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

C#
public virtual void CopyTo(System.Web.SiteMapNode[] array, int index);

Parameters

array
SiteMapNode[]

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

index
Int32

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

Exceptions

array is null.

index is less than zero.

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.

Remarks

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

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also