How to get floats value without including exponential notation

后端 未结 5 1071
自闭症患者
自闭症患者 2021-01-02 01:04

In C#, is it possible to perform ToString on a float and get the value without using exponentials?

For example, consider the following:

float dummy;
         


        
5条回答
  •  迷失自我
    2021-01-02 01:41

    Console.WriteLine(dummy.ToString("N5"));
    

    where 5 its number of decimal places

提交回复
热议问题