ConcurrentDictionary<TKey,TValue>.Item[TKey] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定與指定索引鍵相關聯的值。
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 集合中不存在。