Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set default thread culture for all thread? [duplicate]

Possible Duplicate:
Setting CurrentCulture and CurrentUICulture of an application

I want to set a default culture for every thread that i open in my application. Is there a way to set it (without setting it on every thread individually)

Thanks

like image 857
Amir Yonatan Avatar asked Jan 28 '13 13:01

Amir Yonatan


1 Answers

if you are using .net 4.5 you can use the below property

CultureInfo.DefaultThreadCurrentCulture Property

In the .NET Framework 4 and previous versions, by default, the culture of all threads is set to the Windows system culture. For applications whose current culture differs from the default system culture, this behavior is often undesirable. In the .NET Framework 4.5, the DefaultThreadCurrentCulture property enables an application to define the default culture of all threads in an application domain.

http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.defaultthreadcurrentculture.aspx

like image 197
Massimiliano Peluso Avatar answered Sep 28 '22 03:09

Massimiliano Peluso