ReadOnlyDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Item[TKey] 属性
定义
获取具有指定键的元素。Gets the element that has the specified key.
property TValue System::Collections::Generic::IDictionary<TKey,TValue>::Item[TKey] { TValue get(TKey key); void set(TKey key, TValue value); };
TValue System.Collections.Generic.IDictionary<TKey,TValue>.Item[TKey key] { get; set; }
member this.System.Collections.Generic.IDictionary<TKey,TValue>.Item('Key) : 'Value with get, set
Property Item(key As TKey) As TValue Implements IDictionary(Of TKey, TValue).Item
参数
- key
- TKey
要获取或设置的元素的键。The key of the element to get or set.
属性值
- TValue
具有指定键的元素。The element that has the specified key.
实现
例外
key 为 null。key is null.
检索了属性但没有找到 key。The property is retrieved and key is not found.
设置该属性。The property is set.