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

指定之索引處的索引鍵/值組的值。

實作

例外狀況

keynull

會擷取該屬性,而且 key 不存在於集合中。

適用於

另請參閱