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;
Query syntax is being converted to Method syntax by compiler, so they are the same.
They both will be converted to the same expression.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With