我想使用string.replace替换字符串中的某一个字,当我将textbox的值传入时总是不能正确替换。
我使用
if (double.TryParse(originalAmount.Replace('¥', ' '), out billAmount))
{
tipAmount = billAmount * tipPercentage;
totalAmount = billAmount + tipAmount;
}
将originalAmount中的¥转换为空格,originalAmount为TextBox.Text,传值传到上述类的方法中
我想知道为什么不行,如何才能几角这个问题