Map - Description


The generic class Map is an unordered collection. The generic has two type parameters, K - the key type, and T - the data type. The generic class Map exists in the namespace IPlusPlus.Persist (in assembly IPlusPlus.Persist.dll).

When creating a map Map<K,T>, the key class K is expected to be equality comparable and serializable. The data type T is expected to be serializable. There are two ways in which the comparer for class K can be specified:

  1. the class K may derive from IEqualityComparable of K or
  2. the constructor Map - Comparer may be used to manually specify the comparer.

The declaration of the map class (in C#) is shown below.

[Serializable]
public class Map<K,T> : IDictionary<K,T>
{
 ...
}