VB.NET: Two dimensional sort

  • Thread starter Thread starter Ali Chambers
  • Start date Start date
A

Ali Chambers

Hi,

I have a two arrays that I wish to sort. One is the index array (full
of floating point values). The other is a string array:

ARRAY 1 ARRAY 2
------- --------
-1.2 textA
12 textB
23.5 textC
-100.2 textD

I'd like to sort by Array1 but also change the order in Array 2:

ARRAY 1 ARRAY 2
------- --------
23.5 textC
12 textB
-1.2 textA
-100.2 textD

How would I do this in VB.NET?

Thanks,
Alex
 
I would think that one of the Array.Sort overloads would work! You can sort
one array and change order in another based on the first array sort. Hope
this helps.
 
Back
Top