var CW_KHKK = a.CW_KHKK == null ? 0.ToString("#,##0.00") : Convert.ToDouble(a.CW_KHKK).ToString("#,##0.00"); 效果图: