String format for only one decimal place?

前端 未结 6 1677
天命终不由人
天命终不由人 2020-12-10 10:44

I\'d like to dispaly only one decimal place. I\'ve tried the following:

string thevalue = \"6.33\";
thevalue = string.Format(\"{0:0.#}\", thevalue);
         


        
6条回答
提交回复
热议问题