Reputation: 16411
which of the sorted lists below is more performant:
var sortedList = data.OrderBy(row => row.Fullname).ThenBy(row => row.Age);
or this one:
var sortedList = from row in data
orderby row.Fullname, row.Age
select row;
Upvotes: 4
Views: 172
Reputation: 23973
That is both the same. There will be no difference.its more about how you like typing
Upvotes: 2
Reputation: 100258
Query syntax is being converted to Method syntax by compiler, so they are the same.
Upvotes: 7