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
- paymentMethod
Type: Microsoft.CommerceServer.Orders..::.PaymentMethod
A PaymentMethod to be added into the collection.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.