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
- orderAddress
Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderAddress
The new OrderAddress to add to the collection. May not be nullNothingnullptra null reference (Nothing in Visual Basic).
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
- 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.