public static void multiply() { population = (long)Math.Pow(population, 2); if (population > 10000) { MyExceptionArgs args = new MyExceptionArgs("It's enought of you"); throw new MyException(args); } }
public MyException(MyExceptionArgs args) : base(args.Message) { this.args = args; }
private static void throwPopulationExeption() { MyExceptionArgs args = new MyExceptionArgs("It's enought of you"); throw new MyException(args); }