Partager via


Add Method

Adds the specified ShippingDiscountRecord to the end of the ShippingDiscountCollection.

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

Syntax

'Declaration
Public Sub Add ( _
    shippingDiscountRecord As ShippingDiscountRecord _
)
'Usage
Dim instance As ShippingDiscountCollection
Dim shippingDiscountRecord As ShippingDiscountRecord

instance.Add(shippingDiscountRecord)
public void Add(
    ShippingDiscountRecord shippingDiscountRecord
)
public:
void Add(
    ShippingDiscountRecord^ shippingDiscountRecord
)
public function Add(
    shippingDiscountRecord : ShippingDiscountRecord
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

ArgumentException

The entry being added is already a member of a collection.

EntityAlreadyExistsException

A ShippingDiscountRecord already in the current instance that matches the new discount.

Remarks

Adds the specified ShippingDiscountRecord to the end of the ShippingDiscountCollection.

Successfully calling Add updates LastModified.

Permissions

See Also

Reference

ShippingDiscountCollection Class

ShippingDiscountCollection Members

Microsoft.CommerceServer.Runtime.Orders Namespace