Just a friendly helpful tip - if you are using LINQ and have, for example, a list of objects, you can use the OrderBy() method to order it. But in order to order it by additional column criteria, use the following:
listView.DataSource = myList.OrderBy(i => i.Field1).ThenBy(i => i.Field2);
Additionally, the OrderByDescending() and ThenByDescending() methods also exist to assit you.






0 Responses to “LINQ - OrderBy Method and Multiple Fields”
Leave a Reply