Add Method
Add a DiscountApplicationRecord to the end of the DiscountApplicationRecordCollection.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Sub Add ( _
discountApplicationRecord As DiscountApplicationRecord _
)
'Usage
Dim instance As DiscountApplicationRecordCollection
Dim discountApplicationRecord As DiscountApplicationRecord
instance.Add(discountApplicationRecord)
public void Add(
DiscountApplicationRecord discountApplicationRecord
)
public:
void Add(
DiscountApplicationRecord^ discountApplicationRecord
)
public function Add(
discountApplicationRecord : DiscountApplicationRecord
)
Parameters
- discountApplicationRecord
Type: Microsoft.CommerceServer.Runtime.Orders..::.DiscountApplicationRecord
The DiscountApplicationRecord to be added. May not be nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | discountApplicationRecord is nullNothingnullptra null reference (Nothing in Visual Basic). |
ArgumentException | The entry being added is already a member of a collection. |
EntityAlreadyExistsException | A DiscountApplicationRecord that matches the new discount is already in the current instance. |
Remarks
Add a DiscountApplicationRecord to the end of the DiscountApplicationRecordCollection.
Successfully calling Add updates LastModified.
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
DiscountApplicationRecordCollection Class