I have a List<T>
and now i have to show a page to user on which every of the fields inside object are shown with a checkbox.
Now if user checks any of them, or check all of them, or lets say select's none of them, how do I order my list accordingly?
There are some 8 fields out of which user can select any combination, so the data inside the list should be accordingly ordered.
I am currently using List<>
method OrderBy()
.
Any help would be appreciated.
here is How i am using the method but in my case there are 8 fields now how many combinations can becomes of them I cannot put so many ifs there.
SortedList = list.OrderBy(x => x.QuantityDelivered).ThenBy(x => x.Quantity).ToList();