Пример #1
0
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                ICommand command = new Option1Command();
                try
                {
                    command.Execute(args[0]);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Error. {0}", e.Message);
                }
            }
            else
            {
                Console.WriteLine("Run application with input file path parameter. (Interstates.exe data.txt)");
            }
#if DEBUG
            Console.ReadKey();
#endif
        }
Пример #2
0
 static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         ICommand command = new Option1Command();
         try
         {
             command.Execute(args[0]);
         }
         catch (Exception e)
         {
             Console.WriteLine("Error. {0}", e.Message);
         }
     }
     else
     {
         Console.WriteLine("Run application with input file path parameter. (Interstates.exe data.txt)");
     }
     #if DEBUG
     Console.ReadKey();
     #endif
 }