Tag Archives: culture

List the defined locales in C#

This example is fairly straightforward. When the form loads, the following event handler lists the defined locales. private void Form1_Load(object sender, EventArgs e) { // Make the ListBox use tabs. lstLocales.UseTabStops = true; lstLocales.UseCustomTabOffsets = true; // Define the tabs. … Continue reading

Posted in internationalization, system | Tagged , , , , , , , , , , , | Leave a comment

List timezones in C#

This simple example uses the following code to display the defined timezones. // Load the timezone information. private void Form1_Load(object sender, EventArgs e) { foreach (TimeZoneInfo info in TimeZoneInfo.GetSystemTimeZones()) lstTimezones.Items.Add(info); } This code simply loops through the TimeZoneInfo objects returned … Continue reading

Posted in internationalization, system | Tagged , , , , , , , , , , , , , , , | 1 Comment