一、string.Format()
将【数字字符串】转为两位小数显示的字符串:
class="code_img_closed" src="/Upload/Images/2017080315/0015B68B3C38AA5B.gif" alt="" />logs_code_hide('dbf13976-25d5-45f2-8053-96d28a13ca2d',event)" src="/Upload/Images/2017080315/2B1B950FA3DF188F.gif" alt="" />1 dt = dtResult.Select(it => new CommodityPriceLimitEntity 2 { 3 CommodityId = it.CommodityId.ToString(), 4 CommodityName = it.CommodityName.ToString(), 5 CommodityCode = it.CommodityCode.ToString(), 6 Price = string.Format("{0:F2}", it.Price) 7 }).ToList();C# code
--------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------
持续更新中~~
蒙
2017-08-03 13:58 周四