ReadOnlyDictionary<TKey,TValue>.IDictionary.Item[Object] ReadOnlyDictionary<TKey,TValue>.IDictionary.Item[Object] ReadOnlyDictionary<TKey,TValue>.IDictionary.Item[Object] Property

定義

取得具有指定之索引鍵的項目。Gets the element that has the specified key.

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; }
 Property Item(key As Object) As Object Implements IDictionary.Item

參數

key
Object Object Object

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

屬性值

具有指定索引鍵的項目。The element that has the specified key.

實作

例外狀況

屬性已設定。The property is set.

-或--or- 屬性已設定、key 不存在於集合中,而且字典具有固定大小。The property is set, key does not exist in the collection, and the dictionary has a fixed size.

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 ReadOnlyDictionary<TKey,TValue> 執行個體轉換成 IDictionary 介面時,才能使用這個成員。It can be used only when the ReadOnlyDictionary<TKey,TValue> instance is cast to an IDictionary interface.

適用於