Format decimal for percentage values?

前端 未结 5 676
别跟我提以往
别跟我提以往 2020-11-28 23:17

What I want is something like this:

String.Format(\"Value: {0:%%}.\", 0.8526)

Where %% is that format provider or whatever I am looking for

5条回答
  •  一生所求
    2020-11-28 23:47

    If you want to use a format that allows you to keep the number like your entry this format works for me: "# \\%"

提交回复
热议问题