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

定義

在向量中指定的索引處插入專案。

public:
 void InsertAt(unsigned int index, T value);
void InsertAt(uint32_t const& index, T const& value);
public void InsertAt(uint index, T value);
Public Sub InsertAt (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 例外狀況。

適用於

另請參閱