c# - How to sort List<Point> -
this question has answer here:
- how sort list<t> property in object 19 answers
i have variable:
list<points> pointsoflist; it's contain unsorted points( (x,y) - coordinates);
my question how can sort points in list x descending.
for example:
i have this: (9,3)(4,2)(1,1)
i want result: (1,1)(4,2)(9,3)
thank in advance.
linq:
pointsoflist = pointsoflist.orderbydescending(p => p.x).tolist();
Comments
Post a Comment