I have aList<XYZ>, let's call itoListXYZ.
{{3,2,1},{6,5,4},{9,8,7}}
and aList<double>we'll calloListD.
{9,2,5}
Both lists are related, i.eoListD[i]corresponds tooListXYZ[i].I need to sort theXYZvalues inoListXYZaccording to their correspondingdoublevalues inoListD, like so:
{2,5,9} {{6,5,4},{9,8,7},{3,2,1}}
UsingoListD.Sortgives the desired order, but i need a way to sortoListXYZfollowing said order.
I have tried with LINQ or the solution described here, but haven't found the desired results yet.