# Class EquatableDictionary<TKey, TValue>

Namespace
  adas_core.Domain.Utils

Assembly
  adas-core.Domain.dll

    public sealed class EquatableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable, IEquatable<ComparableDictionary<TKey, TValue>> where TKey : notnull where TValue : notnull

#### Type Parameters

`TKey`
`TValue`

Inheritance
  object
  Dictionary<TKey, TValue>
  EquatableDictionary<TKey, TValue>

Implements
  IDictionary<TKey, TValue>
  ICollection<KeyValuePair<TKey, TValue>>
  IReadOnlyDictionary<TKey, TValue>
  IReadOnlyCollection<KeyValuePair<TKey, TValue>>
  IEnumerable<KeyValuePair<TKey, TValue>>
  IDictionary
  ICollection
  IEnumerable
  IDeserializationCallback
  ISerializable
  IEquatable<ComparableDictionary<TKey, TValue>>

Inherited Members
  Dictionary<TKey, TValue>.Add(TKey, TValue)
  Dictionary<TKey, TValue>.Clear()
  Dictionary<TKey, TValue>.ContainsKey(TKey)
  Dictionary<TKey, TValue>.ContainsValue(TValue)
  Dictionary<TKey, TValue>.EnsureCapacity(int)
  Dictionary<TKey, TValue>.GetEnumerator()
  Dictionary<TKey, TValue>.OnDeserialization(object)
  Dictionary<TKey, TValue>.Remove(TKey)
  Dictionary<TKey, TValue>.Remove(TKey, out TValue)
  Dictionary<TKey, TValue>.TrimExcess()
  Dictionary<TKey, TValue>.TrimExcess(int)
  Dictionary<TKey, TValue>.TryAdd(TKey, TValue)
  Dictionary<TKey, TValue>.TryGetValue(TKey, out TValue)
  Dictionary<TKey, TValue>.Comparer
  Dictionary<TKey, TValue>.Count
  Dictionary<TKey, TValue>.this[TKey]
  Dictionary<TKey, TValue>.Keys
  Dictionary<TKey, TValue>.Values
  object.Equals(object, object)
  object.GetType()
  object.ReferenceEquals(object, object)
  object.ToString()

Extension Methods
  DictionaryEx.GetValue<TK, TV>(IDictionary<TK, TV>, TK, TV?)
  DictionaryEx.ToListString<TK, TV>(IDictionary<TK, TV>, string, string)
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Methods

### Equals(object?)

Determines whether the current instance is equal to the specified object by attempting to cast it to a ComparableDictionary<TKey, TValue> and delegating to the typed equality comparison. Returns `false` when the supplied object is not a ComparableDictionary<TKey, TValue>.

    public override bool Equals(object? other)

#### Parameters

`other` object

  The object to compare with the current instance.

#### Returns

bool

  `true` if `other` is a ComparableDictionary<TKey, TValue> and is equal to the current instance; otherwise, `false`.

### Equals(ComparableDictionary<TKey, TValue>?)

Determines whether the current dictionary is equal to another ComparableDictionary<TKey, TValue> by comparing their counts and key-value pairs. Returns `false` if the other dictionary is `null`, has a different count, is missing any key present in this dictionary, or contains a different value for any shared key.

    public bool Equals(ComparableDictionary<TKey, TValue>? other)

#### Parameters

`other` ComparableDictionary<TKey, TValue>

  The dictionary to compare against this instance.

#### Returns

bool

  `true` if both dictionaries contain the same keys with equal values; otherwise, `false`.

### GetHashCode()

Computes a hash code for the collection by combining the hash codes of each key-value pair. Each pair contributes a hash derived from its key and value, and the per-pair hashes are combined using XOR.

    public override int GetHashCode()

#### Returns

int

  An integer hash code that represents the contents of the collection.