Cannot convert from 'System.Windows.Forms.MessageBoxButtons' to 'string'
Which I had no idea for
MessageBox.Show("Problem generating the quiz.Sorry!", MessageBoxButtons.OK, MessageBoxIcon.Error
Random rdmNumber = new Random();
number1 = rdmNumber.Next(0, 10);
number2 = rdmNumber.Next(0, 10);
int selectOp = rdmNumber.Next(0, 4);
operation = "";
switch (selectOp)
{
case 1:
operation = " + ";
solution = number1 + number2;
break;
case 2:
operation = " - ";
if (number1 < number2)
{
int temp = number1;
number1 = number2;
number2 = temp;
}
solution = number1 - number2;
break;
case 3:
operation = " x ";
solution = number1 * number2;
break;
case 4:
operation = " % "; // take out the extra equal sign
solution = number1 % number2;
break;
default:
MessageBox.Show("Problem generating the quiz.Sorry!",
MessageBoxButtons.OK, MessageBoxIcon.Error);
break;
}