Home All Groups Group Topic Archive Search About

vb.net sorting multi dimensional array

Author
23 Feb 2006 3:06 AM
Christopher Miles
Hello,

I am trying to sort this array by the time field , and have all the
other fields move accordingly to match ..

Group_Array(0) - name
Group_Array(1) - severity
Group_Array(2) - Time
Group_Array(3) - Tier
Group_Array(4) - Description
Group_Array(5) - Group
Group_Array(6) - Channel
Group_Array(7) - Country

Does anyone have an example of how I might do this .. I understand
sorting of multi dimension is not supported with array.sort

thanks
Chris

Author
23 Feb 2006 6:28 AM
Homer J Simpson
"Christopher Miles" <chmi***@gmail.com> wrote in message
news:1140664468.190201@sj-nntpcache-3...
Show quoteHide quote
> Hello,
>
> I am trying to sort this array by the time field , and have all the other
> fields move accordingly to match ..
>
> Group_Array(0) - name
> Group_Array(1) - severity
> Group_Array(2) - Time
> Group_Array(3) - Tier
> Group_Array(4) - Description
> Group_Array(5) - Group
> Group_Array(6) - Channel
> Group_Array(7) - Country
>
> Does anyone have an example of how I might do this .. I understand sorting
> of multi dimension is not supported with array.sort

Array.Sort(keys, items) might work. Put the times into the keys array and
the rest into the data items array. Concatenate them with a delimiter like
'|'.