I\'d like to dispaly only one decimal place. I\'ve tried the following:
string thevalue = \"6.33\";
thevalue = string.Format(\"{0:0.#}\", thevalue);
Here are a few different examples to consider:
double l_value = 6;
string result= string.Format("{0:0.00}", l_value );
Console.WriteLine(result);
Output : 6.00
double l_value = 6.33333;
string result= string.Format("{0:0.00}", l_value );
Console.WriteLine(result);
Output : 6.33
double l_value = 6.4567;
string result = string.Format("{0:0.00}", l_value);
Console.WriteLine(result);
Output : 6.46