ArraySectionTItem Property

Gets or sets the element at the specified index.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public T this[
	int index
] {
	get;
	set;
 }

Parameters

index  Int32
The zero-based index of the element to get or set.

Return Value

T
The element at the specified index.

Implements

IListTItemInt32
IReadOnlyListTItemInt32

Remarks

This member validates index against Length. To allow getting/setting any element in the UnderlyingArray use the GetElementUnchecked/SetElementUnchecked methods instead.

If the compiler you use supports members that return a value by reference, you can also use the GetElementReference method.

Exceptions

IndexOutOfRangeExceptionindex is less than zero or greater or equal to Length.

See Also