programmatically re-order a collection of string values
Posted on 2009-04-07
How would one go about changing the order of some string values in a collection. Say I have the following list of values in a list collection:
List<string> colors = new List<string>("red","blue","yellow","green","purple");
I want to add the values in the colors list to a selection list, but in a different order:
Not ascending or descending, but in a sequence I need to specify.
How could I accomplish this?
Thanks for any help.