ArraySegment<T>.IReadOnlyList<T>.Item[Int32] 属性

定义

获取数组段的指定索引处的元素。Gets the element at the specified index of the array segment.

property T System::Collections::Generic::IReadOnlyList<T>::Item[int] { T get(int index); };
T System.Collections.Generic.IReadOnlyList<T>.Item[int index] { get; }
member this.System.Collections.Generic.IReadOnlyList<T>.Item(int) : 'T
 ReadOnly Property Item(index As Integer) As T Implements IReadOnlyList(Of T).Item

参数

index
Int32

要获取的元素的索引(索引从零开始)。The zero-based index of the element to get.

属性值

T

指定索引处的元素。The element at the specified index.

实现

例外

index 不是 ArraySegment<T> 中的有效索引。index is not a valid index in the ArraySegment<T>.

基础数组为 nullThe underlying array is null.

设置该属性。The property is set.

注解

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 ArraySegment<T> 实例被强制转换为 IReadOnlyList<T> 接口时使用。It can be used only when the ArraySegment<T> instance is cast to an IReadOnlyList<T> interface.

适用于