I want to set default culture info for that class or for entire application.
For example in Turkey 3,2 = in english 3.2
so application uses my local but i want it to use as default
System.Globalization.CultureInfo.InvariantCulture
How can i set it to that as default for that specific class or for entire application
This question is related to
c#
c#-4.0
globalization
cultureinfo
invariantculture
With 4.0, you will need to manage this yourself by setting the culture for each thread as Alexei describes. But with 4.5, you can define a culture for the appdomain and that is the preferred way to handle this. The relevant apis are CultureInfo.DefaultThreadCurrentCulture and CultureInfo.DefaultThreadCurrentUICulture.
If you use a Language Resource file to set the labels in your application you need to set the its value:
CultureInfo customCulture = new CultureInfo("en-US");
Languages.Culture = customCulture;
Source: Stackoverflow.com