how to display doubles with trailing zeros in csharp

Code Example - how to display doubles with trailing zeros in csharp

                
                        int numDigitsAfterPoint = 5;
double num = 1.25d;
string result = num.ToString("0." + new string('0', numDigitsAfterPoint));