Partager via


CopyTo Method

Copies all of the elements in the current instance to a compatible one-dimensional CommerceCache array, starting at the specified index in the array.

Namespace:  Microsoft.CommerceServer.Runtime.Caching
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Sub CopyTo ( _
    array As CommerceCache(), _
    index As Integer _
)
'Usage
Dim instance As CommerceCacheCollection
Dim array As CommerceCache()
Dim index As Integer

instance.CopyTo(array, index)
public void CopyTo(
    CommerceCache[] array,
    int index
)
public:
void CopyTo(
    array<CommerceCache^>^ array, 
    int index
)
public function CopyTo(
    array : CommerceCache[], 
    index : int
)

Parameters

  • index
    Type: System..::.Int32
    The zero-based index in the destination array at which storing begins.

Exceptions

Exception Condition
ArgumentException

The array is multidimensional, the index is equal to or greater than the length of array, or the number of elements in the source collection is greater than the available space from index to the end of the destination array.

ArgumentNullException

array is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

index is less than zero.

InvalidCastException

The type of the source System.Collections.ICollection cannot be cast automatically to the type of the destination array.

Remarks

Copies the cache objects to an array, starting at the specified index in the array. The CommerceCache elements are copied to the target array, starting at the specified index of the target array.

Permissions

See Also

Reference

CommerceCacheCollection Class

CommerceCacheCollection Members

Microsoft.CommerceServer.Runtime.Caching Namespace