IVector<T>.GetAt(UInt32) 方法

定義

傳回向量中指定索引處的專案。

public:
 T GetAt(unsigned int index);
T GetAt(uint32_t const& index);
public T GetAt(uint index);
Public Function GetAt (index As UInteger) As T

參數

index
UInt32

unsigned int

uint32_t

項目之以零起始的索引。

傳回

T

在指定之索引處的項目。

備註

使用 .NET 進行程式設計時,此介面會隱藏,您應該使用System.Collections.Generic.IList < T >介面。

如果索引超出範圍,則檢視會擲回例外狀況。

C++/WinRT 如果索引超出範圍,向量將會擲回 hresult_out_of_bounds 例外狀況。

C++/CX 如果索引超出範圍,向量將會擲回 OutOfBoundsException 例外狀況。

適用於

另請參閱