ConcurrentDictionary<TKey,TValue>.Item[TKey] ConcurrentDictionary<TKey,TValue>.Item[TKey] ConcurrentDictionary<TKey,TValue>.Item[TKey] ConcurrentDictionary<TKey,TValue>.Item[TKey] Property

定義

取得或設定與指定之索引鍵相關聯的值。Gets or sets the value associated with the specified key.

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 TKey TKey TKey

要取得或設定之值的索引鍵。The key of the value to get or set.

屬性值

TValue TValue TValue TValue

指定之索引處的索引鍵/值組的值。The value of the key/value pair at the specified index.

實作

例外狀況

會擷取該屬性,而且 key 不存在於集合中。The property is retrieved and key does not exist in the collection.

適用於

另請參閱