語言

OrderedDictionary<TKey,TValue>.SetAt 方法

定義

多載

名稱 Description
SetAt(Int32, TValue)

在指定索引處設定鍵值。

SetAt(Int32, TKey, TValue)

在指定的索引上設定鍵值對。

SetAt(Int32, TValue)

來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs

在指定索引處設定鍵值。

public:
 void SetAt(int index, TValue value);
public void SetAt(int index, TValue value);
member this.SetAt : int * 'Value -> unit
Public Sub SetAt (index As Integer, value As TValue)

參數

index
Int32

要取得或設定的元素的零基指數。

value
TValue

要儲存在指定索引的值。

例外狀況

index 小於 0 或大於或等於 Count。

適用於

SetAt(Int32, TKey, TValue)

來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs

在指定的索引上設定鍵值對。

public:
 void SetAt(int index, TKey key, TValue value);
public void SetAt(int index, TKey key, TValue value);
member this.SetAt : int * 'Key * 'Value -> unit
Public Sub SetAt (index As Integer, key As TKey, value As TValue)

參數

index
Int32

要取得或設定的元素的零基指數。

key
TKey

要儲存在指定索引的金鑰。

value
TValue

要儲存在指定索引的值。

例外狀況

key 是 null。

index 小於 0 或大於或等於 Count。

適用於