有人可以告诉我Application.CurrentCulture
和Thread.CurrentCulture
之间的区别。
线程具有CurrentCulture
和CurrentUICulture
。但是应用程序只有CurrentCulture
。为什么?
我指的是下面提到的此链接:
Application.CurrentCulture
委托给Application.CurrentCulture
(“获取或设置当前线程的区域性信息”),因此它仅将其设置为应用程序的主线程。在.NET 4.5中,您可以使用Thread.CurrentThread.CurrentCulture
属性来更改AppDomain的区域性。
这里是CultureInfo.DefaultThreadCurrentCulture
的CultureInfo.DefaultThreadCurrentCulture
:
source