Share via


IndexOf Method (Int32)

Returns the zero based index of the PromoCodeRecord specified by the identifier.

Namespace:  Microsoft.CommerceServer.Runtime.Orders
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Function IndexOf ( _
    promoCodeDefinitionId As Integer _
) As Integer
'Usage
Dim instance As PromoCodeRecordCollection
Dim promoCodeDefinitionId As Integer
Dim returnValue As Integer

returnValue = instance.IndexOf(promoCodeDefinitionId)
public int IndexOf(
    int promoCodeDefinitionId
)
public:
int IndexOf(
    int promoCodeDefinitionId
)
public function IndexOf(
    promoCodeDefinitionId : int
) : int

Parameters

Return Value

Type: System..::.Int32
The zero based index of the PromoCodeRecord, specified by the identifier. The index of the entry, or -1 if not found.

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

See Also

Reference

PromoCodeRecordCollection Class

PromoCodeRecordCollection Members

IndexOf Overload

Microsoft.CommerceServer.Runtime.Orders Namespace