Szerkesztés

Megosztás a következőn keresztül:


ReadOnlyCollection<T>.IList<T>.Item[Int32] Property

Definition

Gets the element at the specified index. An NotSupportedException occurs if you try to set the item at the specified index.

property T System::Collections::Generic::IList<T>::Item[int] { T get(int index); void set(int index, T value); };
T System.Collections.Generic.IList<T>.Item[int index] { get; set; }
member this.System.Collections.Generic.IList<T>.Item(int) : 'T with get, set
 Property Item(index As Integer) As T Implements IList(Of T).Item

Parameters

index
Int32

The zero-based index of the element to get.

Property Value

T

The element at the specified index.

Implements

Exceptions

Always thrown if the property is set.

Remarks

Because the collection is read-only, you can only get this item at the specified index. An exception will occur if you try to set the item. This member is an explicit interface member implementation. It can be used only when the ReadOnlyCollection<T> instance is cast to an IList<T> interface.

Applies to