Collections - Sort( ) with IComparable and IComparer
Idea: Make your own implementations of IComparable and IComparer interfaces.
Background:MSDN: IComparable, MSDN: IComparer, MSDN: Guidelines for Overloading Equals()
Create a class Car(RegNo, Model, Year). The class must implement IComparable to compare RegNo.
Create two Classes: CarModelComparator and CarYearComparator - both must implements IComparer.
Create a list of Cars List<Car> , add som Car-objects and use the Sort() method to Sort Cars by RegNo, Model and Year.
Implement (override) the Equals-method - why is it a good idea?
Test it!!