My Tips and Tricks for C#, C, C++, MatLAB, Java, LaTeX, Python and more!
Monday, June 22, 2020
How to set CurrentCulture for all threads in a domain in .NET 4.5
In your Main-Method add the following lines:
System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo("en-US");
System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = new System.Globalization.CultureInfo("en-US");
References:
morteza/how-to-set-currentculture-for-all-threads-in-a-domain-in-net-4-5
https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=netcore-3.1
Labels:
C#,
Thead Localization
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Your comment will be visible after approval.