有人能告诉我Application.CurrentCulture和Thread.CurrentCulture的区别吗?
线程有CurrentCulture和CurrentUICulture。但是应用程序只有CurrentCulture。为什么?
我指的是下面提到的这个链接:
发布于 2015-04-15 07:58:36
Application.CurrentCulture委托给Thread.CurrentThread.CurrentCulture(“获取或设置当前线程的区域性信息”),因此它只为应用程序的主线程设置它。在.NET 4.5中,可以使用CultureInfo.DefaultThreadCurrentCulture属性更改AppDomain的区域性。
这是来源 of Application.CurrentCulture
public static CultureInfo CurrentCulture
{
get {
return Thread.CurrentThread.CurrentCulture;
}
set {
Thread.CurrentThread.CurrentCulture = value;
}
}https://stackoverflow.com/questions/29644594
复制相似问题