public static void Main() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; var catalog = new TicketCatalog(); while (true) { string commandLine = Console.ReadLine(); if (commandLine == null) { break; } if (commandLine != string.Empty) { commandLine = commandLine.Trim(); string commandResult = catalog.ParseCommand(commandLine); Console.WriteLine(commandResult); } } }
private static void Main() { var ticketCatalog = new TicketCatalog(); while (true) { var line = Console.ReadLine(); if (line == null) { break; } if (line == string.Empty) { continue; } line = line.Trim(); var commandResult = ticketCatalog.ParseCommand(line); if (commandResult != null) { Console.WriteLine(commandResult); } } }