Site Logo
Site Logo
 
It is currently Sun Apr 02, 2017 10:17 pm

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Order a list
PostPosted: Sun Dec 11, 2016 11:09 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
Hi,
i've a list of psline ,
can i sort the list according to the X coordinate of the starting point?
GiĆ  ?
Thanks


Top
 Profile  
 
 Post subject: Re: Order a list
PostPosted: Mon Dec 12, 2016 10:17 am 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
Something along the lines of the following should work:

Dim list = New List(Of PSLine)()
' Add items to the list
Dim sorted = list.OrderBy(Function(x) x.StartPoint.X)


Top
 Profile  
 
 Post subject: Re: Order a list
PostPosted: Mon Dec 12, 2016 11:29 am 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
sorry but don't work
what is this "Function(x) " ??

The orderby function required:
keyselector as system.func(of delcam.productinterface.powershape.psline,TKey

thanks


Top
 Profile  
 
 Post subject: Re: Order a list
PostPosted: Wed Dec 14, 2016 7:08 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
perfect thanks !!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB