語言

ReadOnlyDictionary<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 是 null。

屬性已設定。

-或-

屬性是設定的, key 集合中不存在,且字典大小固定。

備註

此成員為明確介面成員實作。 它只能在實 ReadOnlyDictionary<TKey,TValue> 例投射到 IDictionary 介面時使用。

適用於