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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -