March 2004
Intermediate to advanced
560 pages
26h 47m
English
public interface IComparer { // Methods int Compare (object x, object y); }
|
BG Note that the IComparer interface allows you to define your own ordering over types, when the original author may not have envisioned a need to sort the class. It's a great hook for comparison and sorting. Combined with IHashCodeProvider, you can use types as keys in a Hashtable even if the original class author neglected to override Equals and GetHashCode for their type. |
Read now
Unlock full access