[英]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.