語言

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

定義

提供一種型別,可用於使用 ConcurrentDictionary<TKey,TValue> a TAlternateKey 作為鍵而非 TKey。

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

類型參數

TKey

字典中索引鍵的類型。

TValue

字典中值的型別。

TAlternateKey

用於查找的另一種金鑰。

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

屬性

名稱 Description
Dictionary

取得 ConcurrentDictionary<TKey,TValue> 該實例執行操作的對應點。

Item[TAlternateKey]

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

方法

名稱 Description
ContainsKey(TAlternateKey)

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

TryAdd(TAlternateKey, TValue)

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

TryGetValue(TAlternateKey, TKey, TValue)

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

TryGetValue(TAlternateKey, TValue)

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

TryRemove(TAlternateKey, TKey, TValue)

從 中移除指定替代鍵 Dictionary<TKey,TValue>的值,並將相關的鍵與元素複製到值參數。

TryRemove(TAlternateKey, TValue)

從 中移除指定替代鍵 Dictionary<TKey,TValue>的值,並將該元素複製到值參數。

適用於