static void Main(string[] args) { Boiler boiler = new Boiler(400); boiler.Increase(); boiler.Decrease(); try{ boiler.check(); } catch (BoilerException e) { Console.WriteLine(e.Message); } Console.ReadKey(); }