Beginning coding here. But in my programming class I have a basic program to enter a couple of numbers, calculates the basic math then displays the equation and answer.
Here is my output to app:
lblAdd2.Text = Convert.ToString(vTools.unformat(txtNum1.Text)) + " + " +
Convert.ToString(vTools.unformat(txtNum2.Text)) + " = " +
mathNum1.ToString();
lblSub2.Text = Convert.ToString(vTools.unformat(txtNum1.Text)) + " - " +
Convert.ToString(vTools.unformat(txtNum2.Text)) + " = " +
mathNum2.ToString();
Is there a way to keep reusing the Conver.ToString(vTools.unformat
? Meaning to shorten a bit to clean up the code a little bit? Possibly type it in once? or leave it as is?