IndexOf Method (DiscountApplicationRecord)
Returns the zero based index of the specified DiscountApplicationRecord.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function IndexOf ( _
discountApplicationRecord As DiscountApplicationRecord _
) As Integer
'Usage
Dim instance As DiscountApplicationRecordCollection
Dim discountApplicationRecord As DiscountApplicationRecord
Dim returnValue As Integer
returnValue = instance.IndexOf(discountApplicationRecord)
public int IndexOf(
DiscountApplicationRecord discountApplicationRecord
)
public:
int IndexOf(
DiscountApplicationRecord^ discountApplicationRecord
)
public function IndexOf(
discountApplicationRecord : DiscountApplicationRecord
) : int
Parameters
- discountApplicationRecord
Type: Microsoft.CommerceServer.Runtime.Orders..::.DiscountApplicationRecord
The DiscountApplicationRecord to return the index of.
Return Value
Type: System..::.Int32
The zero-based index of the specified DiscountApplicationRecord, or -1 if the discount is not found.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | discountApplicationRecord is nullNothingnullptra null reference (Nothing in Visual Basic). |
Remarks
Searches for the specified DiscountApplicationRecord and returns the zero-based index of the first occurrence within the entire DiscountApplicationRecordCollection. Returns -1 if the specified string is not found.
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