Hello everyone,
For a customized class, like I showed in my sample, what will Comparer<>.Default be returned? In my sample, there is System.ArgumentException.
Code:class Program { class Foo { } static void Main(string[] args) { IComparer<Foo> FooComparer = Comparer<Foo>.Default; Foo f1 = new Foo(); Foo f2 = new Foo(); // System.ArgumentException FooComparer.Compare(f1, f2); return; } }
thanks in advance,
George