T_Cyjb_Collections_ObjectModel_DictionaryBase_2 - CYJB/Cyjb GitHub Wiki
为泛型字典提供基类。
System.Object
Cyjb.Collections.ObjectModel.DictionaryBase(TKey, TValue)
Namespace: Cyjb.Collections.ObjectModel
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
[SerializableAttribute]
public abstract class DictionaryBase<TKey, TValue> : IDictionary<TKey, TValue>,
ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>,
IEnumerable, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>,
IDictionary, ICollection
- TKey
- 字典中的键的类型。
- TValue
- 字典中的值的类型。
名称 | 说明 | |
---|---|---|
![]() |
DictionaryBase(TKey, TValue) | 初始化 DictionaryBase(TKey, TValue) 类的新实例。 |
名称 | 说明 | |
---|---|---|
![]() |
Count | 获取当前字典包含的元素数。 |
![]() |
Item | 获取或设置具有指定键的元素。 |
![]() |
Keys | 获取包含当前字典的键的 ICollection(T)。 |
![]() |
Values | 获取包含当前字典的值的 ICollection(T)。 |
名称 | 说明 | |
---|---|---|
![]() |
Add | 向当前字典添加一个带有所提供的键和值的元素。 |
![]() |
CheckIsReadOnly | 检查当前字典是否是只读的。 |
![]() |
Clear | 从当前字典中移除所有元素。 |
![]() |
ContainsKey | 确定当前字典是否包含带有指定键的元素。 |
![]() |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
![]() |
GetEnumerator | 返回一个循环访问字典的枚举器。 |
![]() |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
![]() |
GetSyncRoot | 获取一个可用于同步对当前字典的访问的对象。 |
![]() |
GetType | Gets the Type of the current instance. (继承自 Object。) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
![]() |
Remove | 从当字典中移除包含指定键的元素。 |
![]() |
SetCollectionReadOnly | 将当前字典设置为只读的。 |
![]() |
ToString | Returns a string that represents the current object. (继承自 Object。) |
![]() |
TryGetValue | 获取与指定键关联的值。 |
名称 | 说明 | |
---|---|---|
![]() |
AddRange(KeyValuePair(TKey, TValue)) | 将指定集合的元素添加到当前集合中。 (由 CollectionUtil 定义。) |
![]() |
AsReadOnly(KeyValuePair(TKey, TValue)) | 返回当前集合的只读包装。 (由 CollectionUtil 定义。) |
![]() |
IsDistinct(KeyValuePair(TKey, TValue)) | 判断序列中是否不包含重复元素。 (由 EnumerableUtil 定义。) |