RegionInfo contains information about the country/region. : RegionInfo « Internationalization I18N « C# / C Sharp






RegionInfo contains information about the country/region.

 

using System;
using System.Globalization;

public class SamplesRegionInfo  {
   public static void Main()  {
      RegionInfo myRI1 = new RegionInfo( "US" );
      Console.WriteLine( "   Name:                         {0}", myRI1.Name );
      Console.WriteLine( "   DisplayName:                  {0}", myRI1.DisplayName );
      Console.WriteLine( "   EnglishName:                  {0}", myRI1.EnglishName );
      Console.WriteLine( "   IsMetric:                     {0}", myRI1.IsMetric );
      Console.WriteLine( "   ThreeLetterISORegionName:     {0}", myRI1.ThreeLetterISORegionName );
      Console.WriteLine( "   ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName );
      Console.WriteLine( "   TwoLetterISORegionName:       {0}", myRI1.TwoLetterISORegionName );
      Console.WriteLine( "   CurrencySymbol:               {0}", myRI1.CurrencySymbol );
      Console.WriteLine( "   ISOCurrencySymbol:            {0}", myRI1.ISOCurrencySymbol );
      Console.WriteLine();
   }

}

   
  








Related examples in the same category

1.Create RegionInfo class based on the country/region associated with the specified culture identifier.
2.Gets the name, in English, of the currency used in the country/region.
3.Gets the currency symbol associated with the country/region.