Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

BigList<(Of <(<'T>)>)>..::..Item Property

Gets or sets an item in the list, by index.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public T this[
	int index
] { get; set; }
Public Default Property Item ( _
	index As Integer _
) As T
	Get
	Set
public:
property T default[int^ index] {
	T get (int^ index);
	void set (int^ index, T value);
}

Parameters

index
Type: Int32
The index of the item to get or set. The first item in the list has index 0, the last item has index Count-1.

Return Value

The value of the item at the given index.

Exceptions


ExceptionCondition
ArgumentOutOfRangeExceptionindex is less than zero or greater than or equal to Count.

Remarks


Gettingor setting an item takes time O(log N), where N is the number of items in the list.

To process each of the items in the list, using GetEnumerator() or a foreach loop is more efficient that accessing each of the elements by index.