dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: [RESOLVED] List<T> sorting problem

  1. #1
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    [RESOLVED] List<T> sorting problem

    I found several examples of sorting a list<T> and they all look the same. But it doesn't work with my list
    Code:
             List<entity> list = new List<entity>();
             //list is filled by calling a webservice
    
             list.Sort(delegate(entity e1, entity e2) {
                return e1.name.CompareTo(e2.name);
             });
    also tried sorting on 'id' instead of name, but they both don't work.

    Anyone an idea?

  2. #2
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: [RESOLVED] List<T> sorting problem

    Made some mistake by watching if it was sorted...

    but everythings works fine

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)