Sorting Lists Using IComparer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sorting With IComparer

    #1

    Sorting Lists Using IComparer

    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


  • Jon Skeet [C# MVP]

    #2
    Re: Sorting Lists Using IComparer

    <=?Utf-8?B?U29ydGluZyB XaXRoIElDb21wYX Jlcg==?= <Sorting With
    IComparer@discu ssions.microsof t.com>wrote:
    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.

    --
    Jon Skeet - <skeet@pobox.co m>
    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
    If replying to the group, please do not mail me too

    Comment

    Working...