VB.NET: Two dimensional sort

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top