当我将此对象作为 JSON 传回时,它看起来像这样:
0.000000000000000e+000
我在 C# 中的代码是:
// get adjustments for user
IEnumerable<Severity> existingSeverities =
from s in db.AdjusterPricingGrossLossSeverities
where s.type == type
&& s.adjusterID == adj.id
select new Severity
{
id = s.severity,
adjustment = Math.Round((double)s.adjustment, 2, MidpointRounding.AwayFromZero).ToString(),
isT_E = (bool)s.isTimeAndExpense
};
我怎样才能让它四舍五入到小数点后两位(0.00)?