I am trying to find an easy way to sort a rowset based on a "sorting pattern". I'm sorry if my wording is confusing, but I can't think of a better way to describe it (maybe someone can come up with a better way to describe it after reading what I'm trying to do?).
Consider the following list of strings (my "sorting pattern", each item in the "command" list):
- [FA, TY, AK, PO, PR, ZZ, QW, BC]
I would like to use the order of the lines in this list to sort the list of these commands. For example, I need the following list:
to sort in the following list based on the "sort template":
What would be a good way to do this? The best idea I have is to use an enumeration ...
enum Command { FA, TY, AK, PO, PR, ZZ, QW, BC };
... and do Enum.Parse () for each command in my list, I want to sort this list from the list of lines in the list of commands, which will then be sorted according to the order of listing.
I dont know. The listing seems to work, but is there a better way I could do this?
source share