Keep in mind though that QuickSort is pretty slow for a collection of items

that are pre-sorted, or nearly sorted, beforehand - worst case O(n ^ 2)

instead of the best case O(n lg n) that Herfried pointed out. With only 100

items it probably won't make a noticeable difference anyway, but keep that

in mind if you add more items to your collection; or if you perform this

sort a bunch of times.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message

news:uf**************@TK2MSFTNGP15.phx.gbl...

"Boni" <oilia@nospam> schrieb: what is the best collection for fast sort of small (about 100) data

rows.I want to use collection's sort algorithm, instead of implementing

my own.

'ArrayList.Sort' and 'Array.Sort' are implemented as a quick-sort

algorithm, which is pretty fast for most cases (Theta(n log(n)) for n

items).

--

M S Herfried K. Wagner

M V P <URL:http://dotnet.mvps.org/>

V B <URL:http://classicvb.org/petition/>