IComparer is a pain

I really dislike IComparer in .NET. Instead of an interface with one
method, I really would have liked things that take an IComparer to take
a delegate instead. That way, instead of having to whip up an entire
class just to encapsulate my custom sorting algorithm for an Array, I
could just make a method with the right signature and run with it.

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.