Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Returns the zero based index of the PromoCodeRecord specified by the PromoCodeRecord.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function IndexOf ( _
promoCodeRecord As PromoCodeRecord _
) As Integer
'Usage
Dim instance As PromoCodeRecordCollection
Dim promoCodeRecord As PromoCodeRecord
Dim returnValue As Integer
returnValue = instance.IndexOf(promoCodeRecord)
public int IndexOf(
PromoCodeRecord promoCodeRecord
)
public:
int IndexOf(
PromoCodeRecord^ promoCodeRecord
)
public function IndexOf(
promoCodeRecord : PromoCodeRecord
) : int
Parameters
- promoCodeRecord
Type: Microsoft.CommerceServer.Runtime.Orders..::.PromoCodeRecord
The PromoCode record 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 PromoCodeRecord, or -1 if the promo code record is not found.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | promoCodeRecord is nullNothingnullptra null reference (Nothing in Visual Basic). |
Remarks
Searches for the specified PromoCodeRecord and returns the zero-based index of the first occurrence within the entire PromoCodeRecordCollection. 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.
See Also
Reference
PromoCodeRecordCollection Class