Hi Moondog,
The Sort method only works on single dimension arrays. Rather than using a
two dimensional array, you could use a jagged array, e.g:
Dim myArray(1000)() As String
' populate the array, ensuring there are 0 to 9 items in each slot
' the sort
Array.Sort(s, New Comparison(Of String())(AddressOf JaggedArrayComparer))
Private Function JaggedArrayComparer(ByVal item1 As String(), ByVal item2
As String()) As Int32
Return item1(9).CompareTo(item2(9))
End Function
Regards,
Bill.
"moondog" <di****@verizon.netwrote in message
news:11**********************@q3g2000prf.googlegro ups.com...
How do you sort a 2D array?
Dim myArray(10000, 9) As String
myArray contains 10000 records with 9 fields. I want to sort on the
Ninth field.
I want to be able to use the sort method, but how?
myArray.sort( ?, ?)
Thanks,
Moondog