Esempio n. 1
0
        static void Main(string[] args)
        {
            NameSorter sorter = new NameSorter(@"RawNames.txt");

            sorter.Read();
            sorter.Sort();
            sorter.WriteTo(@"SortedNames.txt");
        }
Esempio n. 2
0
 static void Main(string[] args)
 {
     try
     {
         Console.WriteLine("Starting processing...");
         NameSorter sorter = new NameSorter(@"RawNames.txt");
         sorter.Read();
         sorter.Sort();
         sorter.WriteTo(@"SortedNames.txt");
         Console.WriteLine("Processing completed successfully.");
     }
     catch (BadFileFormatException e)
     {
         Console.WriteLine("Exception caught in main:\n" + e);
     }
 }