Table of Contents

Method AddAndReturnIndex

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

AddAndReturnIndex(object)

Adds the specified item to the collection and returns the index at which it was added.

public virtual int AddAndReturnIndex(object item)

Parameters

item object

The item to add to the collection. Can be any object supported by the collection.

Returns

int

The zero-based index of the added item within the collection.

Remarks

If the collection allows duplicate items, the returned index corresponds to the newly added instance. If the item is not added at the end, the method returns the index of the new item as found in the collection.