O'Reilly logo

MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET by MCSD Amit Kalani - MCAD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Apply Your Knowledge

Exercises

8.1. Using Localized Calendars

In addition to the features described earlier in the chapter, the CultureInfo class can supply localized calendars for different cultures. In this exercise, you'll see how you can retrieve culture-specific calendar information.

Estimated time: 20 minutes

1.
Open a Visual C# .NET Windows application in the Visual Studio .NET IDE.
2.
Add a new form to the application.
3.
Place a Label control, a ComboBox control (cboCultures), and a ListBox control (lbInfo) on the form.
4.
Switch to the code view and add the following using directive:
using System.Globalization;
5.
Add code to handle the Load event of the form and the SelectedIndexChanged event of the ComboBox control:
 private void Exercise8_1_Load( ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required