How to convert this scientific notation to decimal?

后端 未结 6 1138
误落风尘
误落风尘 2020-12-11 00:38

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

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

decimal h2 = Decima         


        
6条回答
  •  一生所求
    2020-12-11 01:16

    use System.Globalization.NumberStyles.Any

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

提交回复
热议问题