<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'>

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

        Formatting Numbers as Strings with Commas in place of Decimals(用逗号代替小数将数字格式化为字符串)
      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); 
                  

                  应该做你想做的.

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

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Force JsonConvert.SerializeXmlNode to serialize node value as an Integer or a Boolean(强制 JsonConvert.SerializeXmlNode 将节点值序列化为整数或布尔值)
                  Using JSON to Serialize/Deserialize TimeSpan(使用 JSON 序列化/反序列化 TimeSpan)
                  Could not determine JSON object type for type quot;Classquot;(无法确定类型“Class的 JSON 对象类型.)
                  How to deserialize a JSONP response (preferably with JsonTextReader and not a string)?(如何反序列化 JSONP 响应(最好使用 JsonTextReader 而不是字符串)?)
                  how to de-serialize JSON data in which Timestamp it-self contains fields?(如何反序列化时间戳本身包含字段的JSON数据?)
                  JSON.Net custom contract serialization and Collections(JSON.Net 自定义合约序列化和集合)
                      <bdo id='Z1n8Q'></bdo><ul id='Z1n8Q'></ul>

                    • <small id='Z1n8Q'></small><noframes id='Z1n8Q'>

                        <tbody id='Z1n8Q'></tbody>

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

                      <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>
                    • <legend id='Z1n8Q'><style id='Z1n8Q'><dir id='Z1n8Q'><q id='Z1n8Q'></q></dir></style></legend>