P_Cyjb_Collections_ObjectModel_ReadOnlyDictionaryBase_2_Item - CYJB/Cyjb GitHub Wiki
获取或设置具有指定键的元素。
Namespace: Cyjb.Collections.ObjectModel
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public TValue this[
TKey key
] { get; set; }
- key
- Type: TKey
要获取或设置的元素的键。
Type: TValue
指定键对应的值。
IDictionary(TKey, TValue).Item(TKey)
IReadOnlyDictionary(TKey, TValue).Item(TKey)
异常 | 条件 |
---|---|
ArgumentNullException |
key 为 null 。 |
KeyNotFoundException | 未找到指定的 key。 |
NotSupportedException | 设置时总是引发。 |
ReadOnlyDictionaryBase(TKey, TValue) 类
Cyjb.Collections.ObjectModel 命名空间