Index Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets the index of the current line item within the line item collection.

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

Syntax

'Declaration
Public ReadOnly Property Index As Integer
'Usage
Dim instance As LineItem
Dim value As Integer

value = instance.Index
public int Index { get; }
public:
property int Index {
    int get ();
}
public function get Index () : int

Property Value

Type: System..::.Int32
The zero-based index of the line item instance within the LineItemCollection.

Remarks

If the line item has not been added to a collection, the index value is -1. Index is valid only for the current line item. It is not saved to the database, so the value can change after reloading from the database.

After removal of a line item from a LineItemCollection, the indexes for the remaining LineItem line item objects are recalculated.

Permissions

See Also

Reference

LineItem Class

LineItem Members

Microsoft.CommerceServer.Runtime.Orders Namespace