FRun Sample [View Source

Crypto Ultimatum

How to Make Money Investing in Bitcoin, Cryptocurrency

Get Instant Access


Use Encodings Set Culture and Region Handle Multiple Encodings Display Multiple Currencies

Back to Index

Get URL for this page

How Do I...Use the CultureInfo and RegionInfo classes?

The CultureInfo and RegionInfo classes are exported from the System.Globalization namespace. CultureInfo contains a culture's DisplayName, Calendar, and various official abbreviations.

Dim C As CultureInfo = New CultureInfo("en-us")

Console.WriteLine ("The CultureInfo is set to: {0}", C.DisplayName) Console.WriteLine ("The parent culture is: {0}", C.Parent.DisplayName)

Console.WriteLine ("The three leter ISO language name is: {0}", C.ThreeLetterISOLanguageNa Console.WriteLine ("The default calendar for this culture is: {0}\n\n", C.Calendar.ToStrin

RegionInfo contains information for a given region including DisplayName, currency information, and official abbreviations. RegionInfo also contains a static property to retreive the CurrentRegion.

Dim R As RegionInfo = New RegionInfo("us") Console.WriteLine ("The name of this region Console.WriteLine ("The currency symbol for Console.WriteLine ("Is this region metric :

the region is: {0}", R.CurrencySymbol) {0}", R.IsMetric)


VB CultureRegion.exe fRun Sample! | fView Source!

Was this article helpful?

0 0

Post a comment