How to

get / set current culture

Published: 27. January 2009 | Updated: 11. October 2011
License: Microsoft Public License (MS-PL)
Categories: Globalization
Tags: C# Globalization Threading
Was this snippet helpful for you? YESYES / NONO

Import namespaces

using System.Globalization;
using System.Threading;

Code

// sets current thread culture to GB english
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB");

// sets current thread UI culture to GB english
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-GB");
Send us feedback about this snippet »



Related Snippets: