IVector<T>.SetAt(UInt32, T) 方法

定義

設定向量中指定索引處的值。

public:
 void SetAt(unsigned int index, T value);
void SetAt(uint32_t const& index, T const& value);
public void SetAt(uint index, T value);
Public Sub SetAt (index As UInteger, value As T)

參數

index
UInt32

unsigned int

uint32_t

要設定值之以零起始的索引。

value
T

要設定的專案。

備註

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

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

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

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

適用於

另請參閱