none
Convert double to string with the digits after the decimal point RRS feed

  • Question


  • Hi,

    I am trying to convert a double value to string. But the digits after the decimal point are truncated.

    The string value is "10". The Zeros after the decimal point are not present in the string value after conversion.

    I want to write the string value "10.00" to a text file.

    double dbInput = 10.00
    string strValue = dbInput .ToString();
    The string value is "10". 

    How to retain the digits after the decimal point while converting the double to string?

    Thanks

    Ashok

    Friday, December 28, 2012 12:30 PM

Answers

All replies