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