Working with Regional Data

Understanding how to work with and display data for various cultures is another key step to developing global applications. Different cultures have different number formats, currency symbols, ways of sorting data—even different calendars. In this section we'll detail how to work with data in a cross-cultural application.

Numbers and Currency

Fortunately, after a user's culture has been set, things such as decimal separators and numeric symbols work according to the rules of a given culture. These rules are defined by an instance of the NumberFormatInfo class. To obtain an instance of NumberFormatInfo based on the current executing thread, you call the CurrentCulture.NumberFormat property, as in the following:

 myNumInfo ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.