For a customized class, like I showed in my sample, what will Comparer<>.Default be returned? In my sample, there is System.ArgumentException.
static void Main(string args)
IComparer<Foo> FooComparer = Comparer<Foo>.Default;
Foo f1 = new Foo();
Foo f2 = new Foo();
thanks in advance,
Too lazy for reading again ? Read the text of the exception. Read the MSDN for Comparer, especially the first block that is named "Remarks". Then it should be obvious, what you are missing.