1 回答
TA贡献1886条经验 获得超2个赞
将这两个设置Main为所需的文化: CultureInfo.DefaultThreadCurrentCulture CultureInfo.DefaultThreadCurrentUICulture
此外,您可以随时更改Application.CurrentCulture应用程序当前线程上的文化。
[STAThread]
static void Main()
{
var culture = CultureInfo.GetCultureInfo("en-US");
// this may fail sometimes: (see Drachenkatze's comment below)
// var culture = new CultureInfo("en-US");
//Culture for any thread
CultureInfo.DefaultThreadCurrentCulture = culture;
//Culture for UI in any thread
CultureInfo.DefaultThreadCurrentUICulture = culture;
//Culture for current thread (STA)
//no need for: Application.CurrentCulture = culture;
//Thread.CurrentThread.CurrentCulture == Application.CurrentCulture
//no need for: Thread.CurrentThread.CurrentCulture = culture;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new RadForm1());
}
- 1 回答
- 0 关注
- 235 浏览
添加回答
举报