Convert numbers with exponential notation from string to double or decimal

后端 未结 4 847
栀梦
栀梦 2020-12-11 01:28

Is there a fast way to convert numbers with exponential notation (examples: \"0.5e10\" or \"-5e20\") to decimal or double?

Update: I found Parse a N

4条回答
  •  醉酒成梦
    2020-12-11 01:49

    the Math.Round does it well, it will reder the number so that will remove, here is how to use it:

    Math.Round(Double.Parse("3,55E-15"),2)
    

提交回复
热议问题