二位小数

来源:互联网 发布:u3d java工资大概多少 编辑:程序博客网 时间:2024/04/29 02:59

  txtPrice.Text = Convert.ToDecimal(dt.Rows[0]["先进先出单价"]).ToString("0.00");

double.Parse(mMyListItems["加权平均单价"]).ToString("f2");

 

            doubled;

            if(double.TryParse(mMyListItems["预估单价"] ,outd)

            {

                 txtEstimatedPrice.Text=d.ToString("f2");

            }

            else

            {

                 txtEstimatedPrice.Text="0.00";

            }

  txt_WeightPrice.Text = double.Parse(mMyListItems["加权平均单价"] =="" ? "0" : mMyListItems["加权平均单价"]).ToString("f2");

0 0
原创粉丝点击