Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Znav
nextC-Sharp Mapping for Constants
prevC-Sharp Mapping for Dictionaries

The utility class Ice.CollectionComparer allows you to compare collections for equality:

Wiki Markup
{zcode:cs}
public class CollectionComparer {
    public static bool
    Equals(System.Collections.IDictionary d1, System.Collections.IDictionary d2);

    public static bool
    Equals(System.Collections.ICollection c1, System.Collections.ICollection c2);

    public static bool
    Equals(System.Collections.IEnumerable c1, System.Collections.IEnumerable c2);
}
{zcode}

Equality of the elements in a collection is determined by calling the elements' Equals method.

Two dictionaries are equal if they contain the same number of entries with identical keys and values.

Two collections that derive from ICollection or IEnumerable are equal if they contain the same number of entries and entries compare equal. Note that order is significant, so corresponding entries must not only be equal but must also appear in the same position.

Ztop
See Also
Zret
Znav
nextC-Sharp Mapping for Constants
prevC-Sharp Mapping for Dictionaries