I have a list of unique items like this:
List<Animals> ItemList = Cat, Dog, Bird, ...
I'm trying to sort it using a external priority list like this:
List<Animals> PriorityList = Dog, Cat, Bird, ...
I found out I can sort the items correctly in this way:
ItemList.OrderBy(i => i == Dog).ThenBy(i => i.Cat).ThenBy(i => i.Bird)...
But the scalability of this approach is terribly bad; do someone has an idea how to do this using LINQ and the PriorityList?