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

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

屬性值

具有指定索引鍵的項目。

實作

例外狀況

keynull

已設定該屬性。

-或-

屬性已設定、key 不存在於集合中,而且字典具有固定大小。

備註

這個成員是明確介面成員實作, 只有在 ReadOnlyDictionary<TKey,TValue> 執行個體轉換成 IDictionary 介面時,才能使用這個成員。

適用於