|
-
Jun 7th, 2009, 09:23 PM
#1
Thread Starter
Member
[RESOLVED] Array Sorting Help...
Hi people.. 
Let's say I have a array named st with a set of values.. 
I want to sort the st(i,3) values from the highest to the lowest.
From what I heard, there is method call Array.Sort(ArrayName)
However this method is only applicable to one dimension array.. 
Is there a method in visual studio that can do the sorting for multi dimension array? 
An Example of what I want to do is listed down below.. 
Before Sorting.
Code:
Dim st As String(,) = _
{ _
{"", "CA", "CA 1.1", "1505"}, _
{"", "CA 1.1", "CA 1.2", "1311"}, _
{"", "CA 1.2", "CA 1.3", "1168"}, _
{"", "CA 1.3", "Expo", "572"}, _
{"", "CA 1.3", "CA 2.1", "351"}, _
{"", "CA 2.1", "CA 2.2", "682"}, _
{"", "PR", "PR 1.1", "2436"} _
}
After Sorting..
Code:
Dim st As String(,) = _
{ _
{"", "PR", "PR 1.1", "2436"}, _
{"", "CA", "CA 1.1", "1505"}, _
{"", "CA 1.1", "CA 1.2", "1311"}, _
{"", "CA 1.2", "CA 1.3", "1168"}, _
{"", "CA 2.1", "CA 2.2", "682"}, _
{"", "CA 1.3", "Expo", "572"}, _
{"", "CA 1.3", "CA 2.1", "351"} _
}
Last edited by LawrenceWong; Jun 7th, 2009 at 09:49 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|