다음을 통해 공유


IndexOf Method (LineItem)

Returns the zero based index of the specified LineItem.

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

Syntax

'Declaration
Public Function IndexOf ( _
    lineItem As LineItem _
) As Integer
'Usage
Dim instance As LineItemCollection
Dim lineItem As LineItem
Dim returnValue As Integer

returnValue = instance.IndexOf(lineItem)
public int IndexOf(
    LineItem lineItem
)
public:
int IndexOf(
    LineItem^ lineItem
)
public function IndexOf(
    lineItem : LineItem
) : int

Parameters

Return Value

Type: System..::.Int32
The zero based index of the specified LineItem, or -1 if the line item is not found.

Remarks

Searches for the specified LineItem and returns the zero-based index of the first occurrence within the entire LineItemCollection. Returns -1 if the specified object is not found.

Permissions

See Also

Reference

LineItemCollection Class

LineItemCollection Members

IndexOf Overload

Microsoft.CommerceServer.Runtime.Orders Namespace