Is it possible to define an anonymous implementation of IComparer?
I believe Java allows anonymous classes to be defined inline - does C#?
Looking at this code I
No, this is not possible. However, you can get the default implementation of IComparer by Comparer.Default. Otherwise you'll need to create a parameterized implementation and use an instance of that.
IComparer
Comparer.Default