IndexOf Method (String, String, String)

Returns the zero based index of the LineItem with the specified product catalog, product identifier, and product variant identifier.

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

Syntax

'Declaration
Public Function IndexOf ( _
    productCatalog As String, _
    productId As String, _
    productVariantId As String _
) As Integer
'Usage
Dim instance As LineItemCollection
Dim productCatalog As String
Dim productId As String
Dim productVariantId As String
Dim returnValue As Integer

returnValue = instance.IndexOf(productCatalog, _
    productId, productVariantId)
public int IndexOf(
    string productCatalog,
    string productId,
    string productVariantId
)
public:
int IndexOf(
    String^ productCatalog, 
    String^ productId, 
    String^ productVariantId
)
public function IndexOf(
    productCatalog : String, 
    productId : String, 
    productVariantId : String
) : int

Parameters

  • productCatalog
    Type: System..::.String
    The product catalog name to which the LineItem belongs. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • productId
    Type: System..::.String
    The product identifier for this product. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
  • productVariantId
    Type: System..::.String
    The product variant identifier for this product. Can be nullNothingnullptra null reference (Nothing in Visual Basic).

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