Sort multi dimensional array

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
 
R

Rushi

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
 

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