簡體   English   中英

如何為框架4.0中的所有線程設置UI文化?

[英]How to set up UI culture for all the threads in framework 4.0?

我想為當前運行的所有線程設置UI文化。 這是我的代碼

 ProcessThreadCollection currentThreads = Process.GetCurrentProcess().Threads;

 foreach (ProcessThread thread in currentThreads)
 {
      //How do i set UI culture here.
 }

否則還有其他方法可以做到這一點。 我正在使用4.0。 我知道在4.5中我們有以下內容

 CultureInfo.DefaultThreadCurrentUICulture

我如何在早期版本中實現它。 至少在4.0?

這里看到答案。

如果要更改ProcessThread的文化,則必須更改操作系統區域設置。

如果創建線程,則可以使用Thread.CurrentCulture來更改區域性。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM