An exercise to handle the DivideByZeroException
ยท// {...}
public static int Calculate10DividedBy(int value)
{
return 10 / value; //if the value is 0, this will throw a DivideByZeroException, so to fix it, handle the exception and return a int.MaxValue when exception is caught
}
// {
}
}
// }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX