I have problem with formatting double in C#. I want to achieve format like this: 2.0, but I get an exception.
string result = string.Format("{0.0}", 2.0d);
I get Format Exception, Input string was not in a correct format. When I change code to:
string result = string.Format("{0:0.0}", 2.0d);
I get comma, not drop as separator. Is there some way to get 2.0 from string.format without any other functions?