Question: What is the largest open source project written in Visual C++ ?

I can see that eMule project is pretty big, but what is largest?

Answer: 
Put the preferred values in a dictionary. Looking up keys in a dictionary is a O(1) operation compared to finding values in a list which is a O(n) operation, so it scales much better.

Create a sort string for each preferred value so that they are placed before the other values. For the other values the value itself will be used as sorting string so that they are actually sorted. (Using any arbitrary high value would only place them at the end of the list unsorted).

```
List<string> data = new List<string> {
    "E", "B", "D", "A", "C", "B", "A", "C"
};
var preferences = new Dictionary<string, string> {
    { "A", " 01" },
    { "B", " 02" },
    { "C", " 03" }
};

string key;
IEnumerable<String> orderedData = data.OrderBy(
    item => preferences.TryGetValue(item, out key) ? key : item
);

```
Yes, you must implement your own `IComparer<string>` and then pass it in as the second argument of LINQ's OrderBy method.

An example can be found here:
[Ordering LINQ results](http://srtsolutions.com/blogs/billwagner/archive/2006/03/29/ordering-linq-results.aspx)