I\'d like to dispaly only one decimal place. I\'ve tried the following:
string thevalue = \"6.33\"; thevalue = string.Format(\"{0:0.#}\", thevalue);
You need it to be a floating-point value for that to work.
double thevalue = 6.33;
Here's a demo. Right now, it's just a string, so it'll be inserted as-is. If you need to parse it, use double.Parse or double.TryParse. (Or float, or decimal.)
double.Parse
double.TryParse
float
decimal