当我ToString()
在下面的方法中删除时,我没有收到错误,那为什么需要呢?
public string BuildEquation()
{
switch (Choice)
{
case "A":
return mNumber1.ToString() + "+" + mNumber2.ToString();
case "S":
return mNumber1.ToString() + "-" + mNumber2.ToString();
case "M":
return mNumber1.ToString() + "*" + mNumber2.ToString();
default:
return mNumber1.ToString() + "/" + mNumber2.ToString(); // corrected
}
}