Search code examples
asp.netdecimal-point

limit double at six decimal place in asp.net


i have a double, the decimal place isn't fix (8-?)

i want to fix the decimal place to six (for example: 1,234567).

this is my double:

CStr(score)

i guess it's quiet simple :P


Solution

  • Try this instead:

    score.ToString("0.000000")