简单的方法来设置的CurrentCulture为整个应用程序? [英] Easy way to set CurrentCulture for the entire application?
本文介绍了简单的方法来设置的CurrentCulture为整个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在一个.NET 2 WinForms应用程序,有什么好办法来设置文化为整个应用程序?
设置CurrentThread.CurrentCulture为每一个新线程是重复的,容易出错。
理想情况下,我想,当设置它的应用程序启动并忘掉它。
In a .net 2 winforms application, what's a good way to set the culture for the entire application?
Setting CurrentThread.CurrentCulture for every new thread is repetitive and error-prone.
Ideally I'd like to set it when the app starts and forget about it.
推荐答案
文化在.NET中的线程是培养系统(如图所示由单个应用程序/进程)。有没有办法覆盖,在.NET中,你必须继续设置的CurrentCulture为每一个新的线程。
The culture for a thread in .NET is the culture for the system (as viewed by a single application/process). There is no way to override that in .NET, you'll have to continue setting the CurrentCulture for each new thread.
这篇关于简单的方法来设置的CurrentCulture为整个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文