How to convert this scientific notation to decimal?

后端 未结 6 1147
误落风尘
误落风尘 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:05

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

提交回复
热议问题