static void DeleteClass() { int id; string idTry; while (true) { Console.WriteLine("Please Enter The ID of Class: "); idTry = Console.ReadLine(); try { id = Int32.Parse(idTry); if (icb.ClassIsExists(id)) { icb.DeleteClass(id); Console.WriteLine("Delete Class Successful!"); } else { Console.WriteLine("Delete Error, Class ID Is Not Exists!"); } break; } catch (Exception e) { Console.WriteLine("Class ID Must Be A Number!"); continue; throw; } } }