Add Method

Adds a shipping method to the end of the ShippingMethodCollection.

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

Syntax

'Declaration
Public Sub Add ( _
    shippingMethod As ShippingMethod _
)
'Usage
Dim instance As ShippingMethodCollection
Dim shippingMethod As ShippingMethod

instance.Add(shippingMethod)
public void Add(
    ShippingMethod shippingMethod
)
public:
void Add(
    ShippingMethod^ shippingMethod
)
public function Add(
    shippingMethod : ShippingMethod
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

EntityAlreadyExistsException

A shipping method with the same shipping group identifier or the same shipping method name already exists in the collection.

Remarks

Adds a member to the ShippingMethodCollection collection object. The shippingMethod object is added to the end of the ShippingMethodCollection. The Count of the collection is incremented.

Permissions

See Also

Reference

ShippingMethodCollection Class

ShippingMethodCollection Members

Microsoft.CommerceServer.Orders Namespace