How do I make decimal.TryParse keep the trailing zeros?

后端 未结 3 1342
一个人的身影
一个人的身影 2021-01-23 00:46

Currently if I do this

decimal d;
temp = \"22.00\";
decimal.TryParse(temp, NumberStyles.Any,  CultureInfo.InvariantCulture, out d);

Then \'d\'

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-23 01:35

    I would say no and to just format the decimal with trailing zeros on display as 22 is still 22.00.

提交回复
热议问题