繁体   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