다음을 통해 공유


IndexOf Method (Guid)

Returns the zero based index of the LineItem with the specified identifier.

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

Syntax

'Declaration
Public Function IndexOf ( _
    lineItemId As Guid _
) As Integer
'Usage
Dim instance As LineItemCollection
Dim lineItemId As Guid
Dim returnValue As Integer

returnValue = instance.IndexOf(lineItemId)
public int IndexOf(
    Guid lineItemId
)
public:
int IndexOf(
    Guid lineItemId
)
public function IndexOf(
    lineItemId : Guid
) : 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 string is not found.

Permissions

See Also

Reference

LineItemCollection Class

LineItemCollection Members

IndexOf Overload

Microsoft.CommerceServer.Runtime.Orders Namespace