O'Reilly logo

Start Here!™ Fundamentals of Microsoft® .NET Programming by Rod Stephens

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

Culture-Aware Functions in .NET

To work correctly in different locales, a program must be able to parse and display values correctly for each locale. For example, if the user enters the date 4/1/12, the program should treat the value as April 1 if it is running in Chicago, and January 4 if it is running in London.

Knowing how to parse and format values in each locale could be a lot of work. Fortunately, the Microsoft .NET Framework provides several methods that handle these differences automatically. The most important methods for reading locale-formatted values are the Parse methods and the Convert class’s conversion methods. The most important methods for producing formatted output are the data types’ ToString methods and the String.Format method. ...

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