public static void Main() { while (true) { int Startstop = Convert.ToInt32(Console.ReadLine()); if (Startstop == 1) { int id = Convert.ToInt32(Console.ReadLine()); Task.Run(() => _jobs.StartJob(id)); } else if (Startstop == 2) { int id = Convert.ToInt32(Console.ReadLine()); _jobs.StopJob(id); } } }