private Goal FindGoal(int id) { Goal goal; while (true) { try { goal = _goalManager.Get(id); break; } catch (Exception) { Console.WriteLine("Такого ID не существует"); id = ReadId(); } } return goal; }
private Goal FindGoal(int id) { Goal goal; while (true) { try { goal = _goalManager.Get(id); break; } catch (Exception) { Console.WriteLine("Такого ID не существует"); id = ReadId(); } } return goal; }