<bdo id='bmSnl'></bdo><ul id='bmSnl'></ul>
    1. <i id='bmSnl'><tr id='bmSnl'><dt id='bmSnl'><q id='bmSnl'><span id='bmSnl'><b id='bmSnl'><form id='bmSnl'><ins id='bmSnl'></ins><ul id='bmSnl'></ul><sub id='bmSnl'></sub></form><legend id='bmSnl'></legend><bdo id='bmSnl'><pre id='bmSnl'><center id='bmSnl'></center></pre></bdo></b><th id='bmSnl'></th></span></q></dt></tr></i><div id='bmSnl'><tfoot id='bmSnl'></tfoot><dl id='bmSnl'><fieldset id='bmSnl'></fieldset></dl></div>
      1. <tfoot id='bmSnl'></tfoot><legend id='bmSnl'><style id='bmSnl'><dir id='bmSnl'><q id='bmSnl'></q></dir></style></legend>

      2. <small id='bmSnl'></small><noframes id='bmSnl'>

        用逗号代替小数将数字格式化为字符串

        时间:2023-05-20
      3. <tfoot id='4jZCb'></tfoot>

            <tbody id='4jZCb'></tbody>

          <small id='4jZCb'></small><noframes id='4jZCb'>

          <legend id='4jZCb'><style id='4jZCb'><dir id='4jZCb'><q id='4jZCb'></q></dir></style></legend>
            <bdo id='4jZCb'></bdo><ul id='4jZCb'></ul>

                • <i id='4jZCb'><tr id='4jZCb'><dt id='4jZCb'><q id='4jZCb'><span id='4jZCb'><b id='4jZCb'><form id='4jZCb'><ins id='4jZCb'></ins><ul id='4jZCb'></ul><sub id='4jZCb'></sub></form><legend id='4jZCb'></legend><bdo id='4jZCb'><pre id='4jZCb'><center id='4jZCb'></center></pre></bdo></b><th id='4jZCb'></th></span></q></dt></tr></i><div id='4jZCb'><tfoot id='4jZCb'></tfoot><dl id='4jZCb'><fieldset id='4jZCb'></fieldset></dl></div>
                • 本文介绍了用逗号代替小数将数字格式化为字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有以下号码:4.3

                  我想将此号码显示为 4,3 以供我们的一些欧洲朋友使用.

                  I'd like to display this number as 4,3 for some of our European friends.

                  我的印象是下面这行可以解决问题:

                  I was under the impression that the following line would do the trick:

                  string ret = string.Format("{0:0,0}", 4.3); // returns "04", not "4,3"
                  

                  我是否使用了不正确的字符串?

                  Am I using the incorrect string?

                  推荐答案

                  我认为:

                  string.Format(System.Globalization.CultureInfo.GetCultureInfo("de-DE"), "{0:0.0}", 4.3); 
                  

                  应该做你想做的.

                  这篇关于用逗号代替小数将数字格式化为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:对混合数字和字符串进行排序 下一篇:使用 .NET 格式化大数

                  相关文章

                      <bdo id='Z1n8Q'></bdo><ul id='Z1n8Q'></ul>

                  1. <small id='Z1n8Q'></small><noframes id='Z1n8Q'>

                    <tfoot id='Z1n8Q'></tfoot>

                  2. <i id='Z1n8Q'><tr id='Z1n8Q'><dt id='Z1n8Q'><q id='Z1n8Q'><span id='Z1n8Q'><b id='Z1n8Q'><form id='Z1n8Q'><ins id='Z1n8Q'></ins><ul id='Z1n8Q'></ul><sub id='Z1n8Q'></sub></form><legend id='Z1n8Q'></legend><bdo id='Z1n8Q'><pre id='Z1n8Q'><center id='Z1n8Q'></center></pre></bdo></b><th id='Z1n8Q'></th></span></q></dt></tr></i><div id='Z1n8Q'><tfoot id='Z1n8Q'></tfoot><dl id='Z1n8Q'><fieldset id='Z1n8Q'></fieldset></dl></div>
                  3. <legend id='Z1n8Q'><style id='Z1n8Q'><dir id='Z1n8Q'><q id='Z1n8Q'></q></dir></style></legend>