可写为
string str=douRate.ToString("0.00");
如返回为double型也可以
double dou=double.Parse(douRate.ToString("0.00"));
当然了也可以用 Math.Round方法
decimal result = Math.Round(douRate,2); 后面的2表示保留小数点后2位小数
可写为
string str=douRate.ToString("0.00");
如返回为double型也可以
double dou=double.Parse(douRate.ToString("0.00"));
当然了也可以用 Math.Round方法
decimal result = Math.Round(douRate,2); 后面的2表示保留小数点后2位小数
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。