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
- shippingMethod
Type: Microsoft.CommerceServer.Orders..::.ShippingMethod
A ShippingMethod to be added into the collection.
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
- 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.
See Also
Reference
ShippingMethodCollection Class