I have a List
where T
is a class that exposes a \"Username\" property. Username is of a custom type that encapsulates a string. I implemen
In my case, I added a try/catch block inside the Compare function, and displayed the exception Message to the console. If there is a bug inside your compare function, you will get this secondary exception ("Failed to compare two elements...").
My problem was specifically with indexing to position 3 of a string that was "" due to another bug.