Solved

# Inverse sorting of two-dimensional array

Posted on 2005-04-27

I know this kind of question has been asked before, but I just cannot figure out how to do it...

Currently I am creating a medical application which should order diseases based on likelihood, so let's imagine this database (which I put in a 2-dim. array):

string[,] TwoDimArray =

{

{"disease_1", "50"},

{"disease_2", "80"},

{"disease_3", "35" }

};

Now I want to sort the array in a way that puts disease_2 on top (because that one has 80% occurrence), then disease_1 and so on.... so it should have an inverse sorting based on the second dimension of the array. I haven't been able to figure out how to do this, hopefully anyone can help!