久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='TreN9'><tr id='TreN9'><dt id='TreN9'><q id='TreN9'><span id='TreN9'><b id='TreN9'><form id='TreN9'><ins id='TreN9'></ins><ul id='TreN9'></ul><sub id='TreN9'></sub></form><legend id='TreN9'></legend><bdo id='TreN9'><pre id='TreN9'><center id='TreN9'></center></pre></bdo></b><th id='TreN9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TreN9'><tfoot id='TreN9'></tfoot><dl id='TreN9'><fieldset id='TreN9'></fieldset></dl></div>

<small id='TreN9'></small><noframes id='TreN9'>

<legend id='TreN9'><style id='TreN9'><dir id='TreN9'><q id='TreN9'></q></dir></style></legend>

    • <bdo id='TreN9'></bdo><ul id='TreN9'></ul>
    <tfoot id='TreN9'></tfoot>
    1. 嘗試為當前語言設置小數(shù)點分隔符,得到“Inst

      Trying to set the decimal separator for the current language, getting quot;Instance is read Onlyquot;(嘗試為當前語言設置小數(shù)點分隔符,得到“Instance is read Only;)
        <tbody id='o1MPb'></tbody>

          <small id='o1MPb'></small><noframes id='o1MPb'>

            <i id='o1MPb'><tr id='o1MPb'><dt id='o1MPb'><q id='o1MPb'><span id='o1MPb'><b id='o1MPb'><form id='o1MPb'><ins id='o1MPb'></ins><ul id='o1MPb'></ul><sub id='o1MPb'></sub></form><legend id='o1MPb'></legend><bdo id='o1MPb'><pre id='o1MPb'><center id='o1MPb'></center></pre></bdo></b><th id='o1MPb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='o1MPb'><tfoot id='o1MPb'></tfoot><dl id='o1MPb'><fieldset id='o1MPb'></fieldset></dl></div>

              <bdo id='o1MPb'></bdo><ul id='o1MPb'></ul>
            • <legend id='o1MPb'><style id='o1MPb'><dir id='o1MPb'><q id='o1MPb'></q></dir></style></legend>

              <tfoot id='o1MPb'></tfoot>
              1. 本文介紹了嘗試為當前語言設置小數(shù)點分隔符,得到“Instance is read Only";的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我的代碼最初是為英語市場編寫的,其中小數(shù)點分隔符是."所以它期望數(shù)值作為字符串使用."作為分隔符.但是我們現(xiàn)在在其他地方也有用戶,例如歐洲的小數(shù)點分隔符是,"的地方.

                I have code that was originally written for an English language market where the decimal separator is "." so it's expecting numeric values as strings to use "." as the separator. But we now have users in other places, e.g., places in Europe where the decimal separator is ",".

                因此,在我的軟件(實際上只是當前線程)的上下文中,我想將當前語言的小數(shù)分隔符覆蓋為."即使它默認為其他內(nèi)容.

                So, in the context of my software (really just the current thread) I want to override the decimal separator for the current language to be "." even if it defaults to something else.

                我試過了

                  String sep = "."; 
                  NumberFormatInfo nfi1 = NumberFormatInfo.CurrentInfo;
                  nfi1.NumberDecimalSeparator = sep;
                

                但我在第三行收到Instance is read-only"異常.顯然 NumberFormatInfo 是不可寫的.那么如何將當前語言的小數(shù)點分隔符設置為默認值以外的值呢?

                But I get an "Instance is read-only" exception on the third line. Apparently NumberFormatInfo is not writable. So how DO you set the current language's decimal separator to something other than its default?

                推薦答案

                您需要創(chuàng)建一個新的文化,您可以使用當前文化作為模板,只需更改分隔符.然后,您必須將當前文化設置為新創(chuàng)建的文化,因為您無法直接更改當前文化中的屬性.

                You need to create a new culture and you can use the current culture as a template and only change the separator. Then you must set the current culture to your newly created one as you cannot change the property within current culture directly.

                string CultureName = Thread.CurrentThread.CurrentCulture.Name;
                CultureInfo ci = new CultureInfo(CultureName);
                if (ci.NumberFormat.NumberDecimalSeparator != ".")
                {
                    // Forcing use of decimal separator for numerical values
                    ci.NumberFormat.NumberDecimalSeparator = ".";
                    Thread.CurrentThread.CurrentCulture = ci;
                 }
                

                這篇關于嘗試為當前語言設置小數(shù)點分隔符,得到“Instance is read Only";的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                Parse malformed XML(解析格式錯誤的 XML)
              2. <i id='6rRE2'><tr id='6rRE2'><dt id='6rRE2'><q id='6rRE2'><span id='6rRE2'><b id='6rRE2'><form id='6rRE2'><ins id='6rRE2'></ins><ul id='6rRE2'></ul><sub id='6rRE2'></sub></form><legend id='6rRE2'></legend><bdo id='6rRE2'><pre id='6rRE2'><center id='6rRE2'></center></pre></bdo></b><th id='6rRE2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6rRE2'><tfoot id='6rRE2'></tfoot><dl id='6rRE2'><fieldset id='6rRE2'></fieldset></dl></div>

                      <bdo id='6rRE2'></bdo><ul id='6rRE2'></ul>

                      <small id='6rRE2'></small><noframes id='6rRE2'>

                      • <tfoot id='6rRE2'></tfoot>
                      • <legend id='6rRE2'><style id='6rRE2'><dir id='6rRE2'><q id='6rRE2'></q></dir></style></legend>
                          <tbody id='6rRE2'></tbody>

                        1. 主站蜘蛛池模板: 亚洲男人的天堂网站 | 免费视频成人国产精品网站 | 成人做爰9片免费看网站 | 亚洲精品中文字幕在线观看 | 国产精品成人国产乱一区 | 国产高清视频 | 天天夜干 | 国产久| 欧美专区日韩专区 | 操操操操操 | 亚洲精品日日夜夜 | 天天射夜夜操 | 国产成人精品a视频一区www | 成人精品国产免费网站 | 一区二区三区精品在线视频 | 成人不卡视频 | 日韩视频中文字幕 | 国产午夜视频 | 欧美久久久久久 | 在线亚洲欧美 | 亚洲视频三区 | 日韩一二区在线 | 久草热视频| 一区二区三区免费在线观看 | 91精品国产综合久久婷婷香蕉 | 国产蜜臀97一区二区三区 | 91麻豆精品国产91久久久更新资源速度超快 | 91精品午夜窝窝看片 | 黄色片免费看视频 | 亚洲精品二区 | 亚洲精品久久久久中文字幕欢迎你 | 91 在线 | 亚洲精品1区 | 日韩精品视频一区二区三区 | 国产精品一区二区久久 | 日韩av免费看| 国产欧美在线 | 99视频在线免费观看 | 国产精品伦理一区 | av中文在线观看 | 国产精品三级久久久久久电影 |