You might want to read up on LINQ deferred execution.
Replace:
name.OrderByDescending(x=> x, comparer);
name.ForEach(x => { Console.WriteLine(x); });
With:
var ordered = name.OrderByDescending(x=> x, comparer).ToList();
ordered.Foreach(Console.WriteLine);
Explanation:
name.OrderByDescending(x => x, comparer)
returns an IEnumerable<String>
and the comparer is not utilized until the collection is enumerated. You are however not storing the result of this operation, so it never happens.