共用方式為


CopyTo Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

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

Namespace:  Microsoft.CommerceServer.Orders
Assembly:  Microsoft.CommerceServer.Orders.CrossTierTypes (in Microsoft.CommerceServer.Orders.CrossTierTypes.dll)

Syntax

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

instance.CopyTo(array, index)
public void CopyTo(
    PaymentMethod[] array,
    int index
)
public:
void CopyTo(
    array<PaymentMethod^>^ array, 
    int index
)
public function CopyTo(
    array : PaymentMethod[], 
    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, 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.

Remarks

The PaymentMethod elements are copied to the target array, starting at the specified index of the target array.

Permissions

See Also

Reference

PaymentMethodCollection Class

PaymentMethodCollection Members

Microsoft.CommerceServer.Orders Namespace