Multi Dimensinal array question

akalmand

Member
Joined
Jul 12, 2007
Messages
8
Programming Experience
Beginner
Hi Guys,

I have made a multi dimensional array like below (the original array have atleast 50 names):

Name filename ID
----------------------------
Body body.csv 3
Chassis chas.csv 2
Engine eng.csv 1
Tranny tans.csv 4

when i was making the array, I was reading the information off a text file and hence the array is sorted as per the first column i.e names. Now I want to sort the array by the IDs (column 3) for further use. How can I accomplish this task. is there a way to sort the array based on column 3???

thanks
 
Instead of using an anonymous multidim-array create a class representing each "record", use a List(of T) to store them, create a class implementing a comparer(of T) to sort it. Have a look at example in post 2, it would take much editing for you to use that.
 
Back
Top