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
- lineItem
Type: Microsoft.CommerceServer.Runtime.Orders..::.LineItem
The LineItem to return the index of.
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
- 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.