static void Main(string[] args) { try { ConsoleUserInterface.Start(); ConsoleUserInterface.Flight(); Console.WriteLine(); } catch (Exception e) { ConsoleUserInterface.PrintFlightInfo(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(e.Message); Console.WriteLine("Полет завершен неудачно."); Console.ResetColor(); } finally { Console.WriteLine("Завершение работы программы.\n"); } }
static void Main(string[] args) { try { ConsoleUserInterface.Start(); ConsoleUserInterface.Flight(); Console.WriteLine(); } catch (Exception e) { ConsoleUserInterface.PrintFlightInfo(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(e.Message); Console.WriteLine("Flight failed."); Console.ResetColor(); } finally { Console.WriteLine("The completion of the program.\n"); } }