✅ Exception handling..
When the method
Run encounters an instance where number2 == 0 i want it to throw an exception BUT i dont want the program to stop. How does that work?Runnumber2 == 0namespace Calculator.Model
{
internal class Division
{
public decimal Run(decimal number1, decimal number2)
{
if (number2 == 0)
{
throw new AlexDivideByZeroException();
}
return number1 / number2;
}
}
}