Sort multi dimensional array

  • Thread starter Thread starter rj
  • Start date Start date
R

rj

Hello,

I have multi dimensional array with names and ages. I want sort this array
in a way that the youngest person is on the first row. Any ideas or
examples?

Richard
 
Hi Richard,

I would like to make some coment on your topic.

If u having only two fields, say name and age then u required two dim
array only.....
..net is providing lots of collection. and there is a SortedList
collection which is usefull....
but u can also use ArrayList.Sort method to sort an array.

But if u want to use traditional array like int[][] i;
then u have to write ur own sorting method to sort ur array....heapsort
is nice one for u...

Thanks,
Rushi
 
Back
Top