Add Method

Adds a payment method to the end of the PaymentMethodCollection.

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

Syntax

'Declaration
Public Sub Add ( _
    paymentMethod As PaymentMethod _
)
'Usage
Dim instance As PaymentMethodCollection
Dim paymentMethod As PaymentMethod

instance.Add(paymentMethod)
public void Add(
    PaymentMethod paymentMethod
)
public:
void Add(
    PaymentMethod^ paymentMethod
)
public function Add(
    paymentMethod : PaymentMethod
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

EntityAlreadyExistsException

A payment method with the same PaymentGroup identifier or the same PaymentMethodName already exists in the collection.

Remarks

Adds a member to the PaymentMethodCollection collection object. The paymentMethod object is added to the end of the PaymentMethodCollection. The Count of the collection is incremented.

Permissions

See Also

Reference

PaymentMethodCollection Class

PaymentMethodCollection Members

Microsoft.CommerceServer.Orders Namespace