ImmutableList<T>.Item[Int32] 属性
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取位于列表指定索引处的元素。
public:
property T default[int] { T get(int index); };
C#
public T this[int index] { get; }
member this.Item(int) : 'T
Default Public ReadOnly Property Item(index As Integer) As T
- index
- Int32
要检索的元素的索引。
T
指定索引处的元素。
在 get 操作中,index
为负或不小于 Count。
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
UWP | 10.0 |