c# - How to sort List<Point> -


this question has answer here:

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

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -