Breyta

Deila með


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.

public:
 virtual void CopyTo(cli::array <System::Web::SiteMapNode ^> ^ array, int index);
public virtual void CopyTo (System.Web.SiteMapNode[] array, int index);
abstract member CopyTo : System.Web.SiteMapNode[] * int -> unit
override this.CopyTo : System.Web.SiteMapNode[] * int -> unit
Public Overridable Sub CopyTo (array As SiteMapNode(), index As Integer)

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

See also