Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey> 結構

定義

提供一種類型,可用來使用 TAlternateKey 做為索引鍵,而不是使用 TKey,在 Dictionary<TKey,TValue> 上執行作業。

public: generic <typename TAlternateKey>
value class Dictionary<TKey, TValue>::AlternateLookup
public readonly struct Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey>
type Dictionary<'Key, 'Value>.AlternateLookup<'AlternateKey> = struct
Public Structure Dictionary(Of TKey, TValue).AlternateLookup(Of TAlternateKey)

類型參數

TKey
TValue
TAlternateKey

執行查閱之索引鍵的替代類型。

繼承
Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey>

屬性

Dictionary

取得這個實例執行作業的 Dictionary<TKey,TValue>

Item[TAlternateKey]

取得或設定與指定替代索引鍵相關聯的值。

方法

ContainsKey(TAlternateKey)

判斷 Dictionary<TKey,TValue> 是否包含指定的替代索引鍵。

Remove(TAlternateKey)

Dictionary<TKey,TValue>移除具有指定替代索引鍵的值。

Remove(TAlternateKey, TKey, TValue)

Dictionary<TKey,TValue>中移除具有指定替代索引鍵的值,並將專案複製到 value 參數。

TryAdd(TAlternateKey, TValue)

嘗試將指定的索引鍵和值新增至字典。

TryGetValue(TAlternateKey, TKey, TValue)

取得與指定替代索引鍵相關聯的值。

TryGetValue(TAlternateKey, TValue)

取得與指定替代索引鍵相關聯的值。

適用於