.NET Samples - How To: Globalization and NLS

This section includes the following samples:

CultureRegion Sample

MultipleEncodings Sample

Encoding Sample

MultiCurrency Sample

CultureRegion Sample

This sample illustrates how to retrieve culture and version information.

Namespaces used in this sample:

System; System.Globalization

Classes used in this sample:

Console; CultureInfo; Region; RegionInfo; String; Calendar

MultipleEncodings Sample

This sample illustrates how to use the ContentEncoding property provided in the HttpWebResponse class and how to create a proper Encoding object from the property value.

Namespaces used in this sample:

System; System.Net; System.IO; System.Globalization

Classes used in this sample:

Uri; Stream; WebRequest; Encoding; String; HttpWebResponse; WebResponse; Import; HttpWebRequest; Url; Page; Type; Exception

Encoding Sample

This sample illustrates how to use multiple encoding formats available from the System.Text namespace.

Namespaces used in this sample:

System; System.Text; System.IO

Classes used in this sample:

Stream; Console; StreamWriter; File; Encoding; FileStream; String; Region

MultiCurrency Sample

This sample illustrates how to use multiple currencies such as the euro and German DM (deutsche mark) in your application.

Namespaces used in this sample:

System; System.Threading; System.Globalization

Classes used in this sample:

String; Form; NumberFormatInfo; Thread; CultureInfo; Page; Import