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

定義

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

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

要取得或設定之值的索引鍵。

屬性值

與指定索引鍵相關聯的值,如果 key 不是在字典中,nullkey 屬於無法指派給 之索引鍵類型的值ConcurrentDictionary<TKey,TValue>

實作

例外狀況

keynull

正在指定值,而且 key 是無法指派給 ConcurrentDictionary<TKey,TValue> 的索引鍵類型或實值類型的類型。

適用於

另請參閱