using System; using System.Collections.Generic;
class Program { static void Main(string[] args) { List<string> l = new List<string>();
l.Add("c12three");
l.Add(String.Empty);
l.Add("5six7");
l.Add("_score");
l.Add("zounds");
l.Add(null);
l.Add("#pound1");
l.Add("#pound2");
l.Add("apple");
l.Sort(new Comparison<string>(
delegate (string s1, string s2)
{ return String.Compare(s1, s2); }));
foreach(string s in l)
{
Console.WriteLine(s);
}
Program.ConsoleKey();
}
static void ConsoleKey()
{
Console.WriteLine(
string.Format("{0}Press any key to continue...",
Environment.NewLine));
Console.ReadKey(false);
}
}