Q:

Change Double Number displaying format?

In C#, if a double number has more than 5 zero (ex: 0.0000456), it will display as 4.56E-05. But I want to display as 0.0000456. Is there anyway to change the display format? Please help!

A:

Use formatting to accomplish this.
        double test = 0.0000456;

        Console.WriteLine(test);
        Console.WriteLine("{0:F7}", test);
        Console.ReadKey();

Output
        4.56E-05
        0.0000456

Max
        double test = 
        0.00000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000001;

        Console.WriteLine(test);

        Console.WriteLine("{0:F99}", test);

        Console.ReadKey();

Output
1E-99
0.00000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000001;

