久久久久久久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. 嘗試為當前語言設置小數點分隔符,得到“Inst

      Trying to set the decimal separator for the current language, getting quot;Instance is read Onlyquot;(嘗試為當前語言設置小數點分隔符,得到“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. 本文介紹了嘗試為當前語言設置小數點分隔符,得到“Instance is read Only";的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

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

                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 ",".

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

                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 是不可寫的.那么如何將當前語言的小數點分隔符設置為默認值以外的值呢?

                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?

                推薦答案

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

                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;
                 }
                

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

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

                相關文檔推薦

                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. 主站蜘蛛池模板: 精品亚洲一区二区三区四区五区 | 日韩精品一区二区三区第95 | 成人av鲁丝片一区二区小说 | 99精品一区二区三区 | 日日骚网 | 91视频麻豆 | 在线黄色网| 欧美在线观看一区 | 亚洲免费视频网址 | 黄色一级大片在线观看 | 欧美色欧美亚洲另类七区 | 国产a一区二区 | 国产一区二区在线免费观看 | 日韩精品一区二区三区在线观看 | 91在线精品一区二区 | 九九九久久国产免费 | 亚洲vs天堂 | 亚洲精彩视频 | 亚洲一区二区免费视频 | 亚洲永久免费 | 一级毛片在线播放 | 91久久精品国产91久久性色tv | 91国自视频 | 欧美精品福利视频 | 日日操日日舔 | 久久国产精品亚洲 | 久久久涩| 久久999 | 欧美一级片久久 | 99久久精品国产一区二区三区 | 四虎影音| 放个毛片看看 | 欧美电影大全 | 毛色毛片免费看 | 日韩欧美国产精品综合嫩v 一区中文字幕 | 久久高清精品 | 久色激情 | 国产福利91精品 | 久久精品色欧美aⅴ一区二区 | 日本视频免费 | 久久精品欧美一区二区三区不卡 |