IVectorView<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 進行程式設計時,會隱藏此介面,開發人員應該使用 IReadOnlyList < T > 介面。

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

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

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

如果基礎集合已變更,檢視可能會擲回例外狀況。

C++/WinRT 如果基礎集合已變更,檢視可能會擲回 hresult_changed_state 例外狀況。

C++/CX 如果基礎集合已變更,檢視可能會擲回 ChangedStateException 例外狀況。

適用於

另請參閱