I need to format double type so that it has minimum two decimal digits but without limitation for maximum number of decimal digits:
5 -> \"5.00\" 5.5
You can use the 0 format specificer for non-optional digits, and # for optional digits:
0
#
n.ToString("0.00###")
This example gives you up to five decimal digits, you can add more # positions as needed.