private delegate int Operate(int x, int y);
Operate usedOperator;
int Add(int x, int y)
{
return x + y;
}
usedOperator.ToString() should return either "+" "-" or whatever method the delegate currently contains. Is this possible somehow?
EDIT: Alternatives to the delegate approach would be fine too. I basically am writing a program that asks the user some math questions with randomized numbers and operators.