score:2

Accepted answer

use a func delegate to store your ordering then pass that to the orderby method:

func<int, int> orderfunc = i => i; // func for ordering
var list = enumerable.range(1,10).orderbydescending(i => i); // 10, 9 ... 1
var newlist = list.orderby(orderfunc); // 1, 2 ... 10

as another example consider a person class:

public class person
{
    public int id { get; set; }
    public string name { get; set; }
}

now you want to preserve a sort order that sorts by the name property. in this case the func operates on a person type (t) and the tresult will be a string since name is a string and is what you are sorting by.

func<person, string> nameorder = p => p.name;

var list = new list<person>
{
    new person { id = 1, name = "abc" },
    new person { id = 2, name = "def" },
    new person { id = 3, name = "ghi" },
};

// descending order by name
foreach (var p in list.orderbydescending(nameorder))
    console.writeline(p.id + ":" + p.name);

// 3:ghi
// 2:def
// 1:abc

// re-assinging the list
list = new list<person>
{
    new person { id = 23, name = "foo" },
    new person { id = 14, name = "buzz" },
    new person { id = 50, name = "bar" },
};

// reusing the order function (ascending by name in this case)
foreach (var p in list.orderby(nameorder))
    console.writeline(p.id + ":" + p.name);

// 50:bar
// 14:buzz
// 23:foo

edit: be sure to add tolist() after the orderby calls if you need a list<t> since the linq methods will return an ienumerable<t>.

score:1

calling tolist() or toarray() on your ienumerable<t> will cause it to be immediately evaluated. you can then assign the resulting list or array to "save" your ordered list.