Add Method

Add a specified OrderAddress to the end of the OrderAddressCollection.

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

Syntax

'Declaration
Public Sub Add ( _
    orderAddress As OrderAddress _
)
'Usage
Dim instance As OrderAddressCollection
Dim orderAddress As OrderAddress

instance.Add(orderAddress)
public void Add(
    OrderAddress orderAddress
)
public:
void Add(
    OrderAddress^ orderAddress
)
public function Add(
    orderAddress : OrderAddress
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

ArgumentException

The address being added is already a member of the collection.

ConfiguredLimitExceededException

The number of order addresses within the order address collection would exceed the OrderAddressCountPerOrderGroupLimit limit specified in Web.config.

EntityAlreadyExistsException

An OrderAddress with the same name or order address ID already exists in the current collection.

Remarks

Add a OrderAddress to the end of the OrderAddressCollection.

Successfully calling Add updates LastModified, ParentOrderGroup, and OrderGroupId .

Permissions

See Also

Reference

OrderAddressCollection Class

OrderAddressCollection Members

Microsoft.CommerceServer.Runtime.Orders Namespace