I'm self-learning using a book.. while working on methods the book introduces returning multiple values from a method. I've changed the code accordingly and installed related Microsoft NuGet package for tuples.. When I check the solution explorer, I can see that System.ValueTuple
there and active.. But my project is not running accordingly as if I'd not installed the tuple package..
else if (division.IsChecked.HasValue && division.IsChecked.Value)
{
int division, reminder;
(division, reminder) = Divide(leftHandSide, rightHandSide);
result.Text = $" reminder ";
}
....
private (int, int) Divide(int leftHandSide, int rightHandSide)
{
expression.Text = $" / ";
int division = leftHandSide / rightHandSide;
int reminder = leftHandSide % rightHandSide;
return (division, reminder);
}
private void showResult(int answer) => result.Text = answer.ToString();
}
}