如何将此科学计数法转换为十进制? [英] How to convert this scientific notation to decimal?

查看:83
本文介绍了如何将此科学计数法转换为十进制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google中搜索后,仍使用下面的代码无法编译

After search in google, using below code still can not be compiled:

decimal h = Convert.ToDecimal("2.09550901805872E-05");   

decimal h2 = Decimal.Parse(
  "2.09550901805872E-05", 
   System.Globalization.NumberStyles.AllowExponent);


推荐答案

Decimal h2 = 0;
Decimal.TryParse("2.005E01", out h2);

这篇关于如何将此科学计数法转换为十进制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆