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

    • <bdo id='6Ej4b'></bdo><ul id='6Ej4b'></ul>

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

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

    1. <legend id='6Ej4b'><style id='6Ej4b'><dir id='6Ej4b'><q id='6Ej4b'></q></dir></style></legend>
      <tfoot id='6Ej4b'></tfoot>

        如何在 .Net 中更改整個進程(不僅僅是當(dāng)前線程

        How can I change the CurrentCulture of the entire process (not just current thread) in .Net?(如何在 .Net 中更改整個進程(不僅僅是當(dāng)前線程)的 CurrentCulture?)

          <tbody id='ewuVJ'></tbody>
          • <small id='ewuVJ'></small><noframes id='ewuVJ'>

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

          • <tfoot id='ewuVJ'></tfoot>

                  <bdo id='ewuVJ'></bdo><ul id='ewuVJ'></ul>
                  本文介紹了如何在 .Net 中更改整個進程(不僅僅是當(dāng)前線程)的 CurrentCulture?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我需要將進程的語言環(huán)境設(shè)置為 en-US.

                  I have a situation where I need to set my process' locale to en-US.

                  我知道如何為當(dāng)前線程執(zhí)行此操作:

                  I know how to do this for the current thread:

                  System.Threading.Thread.CurrentThread.CurrentCulture = 
                       System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
                  

                  但我的應(yīng)用程序使用 BackgroundWorkers 進行一些處理,并且這些工作線程的語言環(huán)境似乎不受上述對其產(chǎn)生的主線程的更改的影響.

                  But my application uses BackgroundWorkers to do some processing, and the locale for these worker threads seems not to be affected by the above change to their spawning main-thread.

                  那么如何在不手動設(shè)置每個線程的情況下為我的應(yīng)用程序中的所有線程設(shè)置語言環(huán)境?

                  So how can I set the locale for all the threads in my application without setting it in each one manually?

                  推薦答案

                  如果您想這樣做,您必須更改操作系統(tǒng)區(qū)域設(shè)置.您希望 BackgroundWorkers 在 en-US 中運行的原因是什么?

                  You'll have to change the operating system locale if you want to do that. For what reason do you want BackgroundWorkers to run in en-US?

                  您的業(yè)務(wù)層應(yīng)該在不變的文化中運行,并且只有最終用戶的 UI 具有特定的文化.

                  You should have your business layer running in an invariant culture, and only have a specific culture for the end user's UI.

                  如果您使用的是 BackgroundWorker 組件,并且必須這樣做,您可以在 DoWork 方法中嘗試這樣的操作:

                  If you are using the BackgroundWorker component, and have to do this you could try something like this in the DoWork method:

                  // In DoWork
                  System.Globalization.CultureInfo before = System.Threading.Thread.CurrentThread.CurrentCulture;
                  try
                  
                  {
                      System.Threading.Thread.CurrentThread.CurrentCulture = 
                          new System.Globalization.CultureInfo("en-US");
                   // Proceed with specific code
                  }
                  
                  finally
                  {
                      System.Threading.Thread.CurrentThread.CurrentUICulture = before;
                  }
                  

                  這篇關(guān)于如何在 .Net 中更改整個進程(不僅僅是當(dāng)前線程)的 CurrentCulture?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guā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)

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

                        <tbody id='mWyjQ'></tbody>

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

                            <tfoot id='mWyjQ'></tfoot>
                            主站蜘蛛池模板: 久草网站| 在线观看免费黄色片 | 日日天天| 在线看国产 | 亚洲精品久久久一区二区三区 | 久久久国产一区 | 国产精品久久久久久久免费观看 | 国产毛片久久久久久久久春天 | 国产精品欧美一区二区 | 国产成人精品免高潮在线观看 | 久久美女网 | 久久亚洲国产精品 | 久久91精品国产一区二区 | 青春草国产 | 中文字幕亚洲视频 | 亚洲精品乱码8久久久久久日本 | 在线黄色网 | 久久精品国产免费高清 | 人人玩人人添人人澡欧美 | 伊人热久久 | 色视频www在线播放国产人成 | 色视频网站 | 伦理一区二区 | 日本三级日产三级国产三级 | www.国产| 久久麻豆精品 | 欧美成人一区二免费视频软件 | 综合久久久 | 久热久草 | 中文字幕国产第一页 | 久国产视频 | 午夜一区二区三区在线观看 | 日韩在线三级 | 精品一二区 | 亚洲精品一| 日韩精品在线观看一区二区 | 99久久精品免费看国产四区 | 国产精品视频一区二区三区四蜜臂 | 三级在线视频 | 中文字幕一区二区三 | 别c我啊嗯国产av一毛片 |