You can use ElfDataDictionary to sort object arrays... sort of. I
don't know about the speed, as its not designed for sorting, but one
user reported good speeds.
The sort order is binary, so it's not a textual sort. It works fine
as long as you don't mix uppercase and lowercase letters.
Also, duplicate keys are removed. So it is not a general purpose
sort. For some purposes however, this is fine. For example, if you
are sorting file names, you'll know ahead of time that there cannot
be duplicate names. Also, if you are doing stuff with unix, you might
want binary sorting order, as a lot of unix stuff sorts by binary
order, like "ls".
Something like this:
function SortED(o() as MyClass)
dim d as new ElfDataDictionary
for each c in o
d.Value( c.StringValue() ) = c
next
dim n as ElfDataNavigator
redim o(-1)
n = d.Navigate
while n.MoveNext
o.append n.Value
wend
end function
There, sorted!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>