PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework SortedList in the CF ?

Reply

SortedList in the CF ?

 
Thread Tools Rate Thread
Old 05-02-2005, 10:07 AM   #1
Carsten Marx
Guest
 
Posts: n/a
Default SortedList in the CF ?


Hi,
is there a chance to get a SortedList ( like in
System.Collections.SortedList ) working in the CF?

Any ideas?

Regards
Carsten
  Reply With Quote
Old 05-02-2005, 10:27 AM   #2
Andreas Wolff
Guest
 
Posts: n/a
Default Re: SortedList in the CF ?

Am Sat, 05 Feb 2005 11:07:15 +0100 schrieb Carsten Marx
<Carsten.Marx@uni-konstanz.de>:

> Hi,
> is there a chance to get a SortedList ( like in
> System.Collections.SortedList ) working in the CF?
>
> Any ideas?


To my mind there is no SortedList in CF 1x available. But you could
implement a simple algorithm for sorting like Bubble-Sort. If you need
higher performance have a look at QuickSort, TrippleSort or HeapSort.

- Andreas Wolff
  Reply With Quote
Old 05-02-2005, 12:39 PM   #3
Daniel Moth
Guest
 
Posts: n/a
Default Re: SortedList in the CF ?

Carsten, search the archives for a number of pointers:
http://groups-beta.google.com/group...arch+this+group

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"Carsten Marx" <Carsten.Marx@uni-konstanz.de> wrote in message
news:Ohh34p2CFHA.3368@TK2MSFTNGP10.phx.gbl...
> Hi,
> is there a chance to get a SortedList ( like in
> System.Collections.SortedList ) working in the CF?
>
> Any ideas?
>
> Regards
> Carsten


  Reply With Quote
Old 07-02-2005, 06:43 AM   #4
Sergey Bogdanov
Guest
 
Posts: n/a
Default Re: SortedList in the CF ?

In addition to all replies you may use ArrayList with implemented your
own IComparer instead:

public class MyComparer : IComparer
{
int IComparer.Compare(Object x, Object y)
{
return((Item)x).Name.CompareTo( ((Item)y).Name);
}
}

....

myArrayList.Sort(new MyComparer());

Sergey Bogdanov
http://www.sergeybogdanov.com


Carsten Marx wrote:
> Hi,
> is there a chance to get a SortedList ( like in
> System.Collections.SortedList ) working in the CF?
>
> Any ideas?
>
> Regards
> Carsten

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off