Compartilhar via


IndexOf Method (String)

Returns the zero based index of the OrderForm with the specified name.

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

Syntax

'Declaration
Public Function IndexOf ( _
    orderFormName As String _
) As Integer
'Usage
Dim instance As OrderFormCollection
Dim orderFormName As String
Dim returnValue As Integer

returnValue = instance.IndexOf(orderFormName)
public int IndexOf(
    string orderFormName
)
public:
int IndexOf(
    String^ orderFormName
)
public function IndexOf(
    orderFormName : String
) : int

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentNullException

orderFormName is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

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

Permissions

See Also

Reference

OrderFormCollection Class

OrderFormCollection Members

IndexOf Overload

Microsoft.CommerceServer.Runtime.Orders Namespace