語言

ConcurrentDictionary<TKey,TValue>.Item[TKey] 屬性

定義

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

public:
 property TValue default[TKey] { TValue get(TKey key); void set(TKey key, TValue value); };
public TValue this[TKey key] { get; set; }
member this.Item('Key) : 'Value with get, set
Default Public Property Item(key As TKey) As TValue

參數

key
TKey

關鍵在於要取得或設定的價值。

屬性值

TValue

指指定索引上的鍵值/值對。

實作

例外狀況

key 是 null。

該屬性被檢索後,在 key 集合中不存在。

適用於

另請參閱