Sorting Lists Using IComparer

G

Guest

Hi,

I have implemened a class which is derived form IComparer to sort using
IComparer. The sorting is functioning well when the sorting objects are
different.
But. when the objects are equal the entire list get sorted.
Can anyone has a solution for this?

Thanks & Regards,
Leshan
 
J

Jon Skeet [C# MVP]

<=?Utf-8?B?U29ydGluZyBXaXRoIElDb21wYXJlcg==?= <Sorting With
I have implemened a class which is derived form IComparer to sort using
IComparer. The sorting is functioning well when the sorting objects are
different.
But. when the objects are equal the entire list get sorted.
Can anyone has a solution for this?

I don't quite understand. Could you post a short but complete program
which demonstrates the problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top