decimal

decimal aa;
aa = decimal.Parse(textBox1.Text);
textBox1.Text= aa.ToString("0.00"); 
或者
textBox1.Text= aa.ToString("f2"); 

在文本框中输入100,执行代码后,变为100.00

posted @ 2016-09-05 09:28  fireBeating  阅读(223)  评论(2编辑  收藏  举报