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