I have a List<string> with the following entries:
“Summer”, “Spring”, “Winter”
I’d like to write a .OrderBy() that orders them based on this:
public enum Term {
Spring = 0, Summer, Fall, Winter, All
}
Thus, the result I’d like to see is:
“Spring”, “Summer”, “Winter”
EDIT – For clarification, not every client has ALL of the available terms, but I just want consistency in the sorting of the list.
1 Answer