ConcurrentDictionary<TKey,TValue>.IDictionary.Item[Object] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定與指定索引鍵相關聯的值。
property System::Object ^ System::Collections::IDictionary::Item[System::Object ^] { System::Object ^ get(System::Object ^ key); void set(System::Object ^ key, System::Object ^ value); };
object System.Collections.IDictionary.Item[object key] { get; set; }
object? System.Collections.IDictionary.Item[object key] { get; set; }
member this.System.Collections.IDictionary.Item(obj) : obj with get, set
Property Item(key As Object) As Object Implements IDictionary.Item
參數
- key
- Object
關鍵在於要取得或設定的價值。
屬性值
與指定鍵值相關的值,若nullkey不在字典中,或key屬於無法指派於鍵型ConcurrentDictionary<TKey,TValue>別的值。
實作
例外狀況
key 是 null。
一個值被指派,且 key 該值的型別無法指派到鍵型別或值 ConcurrentDictionary<TKey,TValue>型別。