Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RegionInfo.DisplayName Property

Gets the full name of the country/region in the language of the localized version of the .NET Framework for Silverlight.

Namespace:  System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public virtual string DisplayName { get; }

Property Value

Type: System.String
The full name of the country/region in the language of the localized version of the .NET Framework for Silverlight.

The DisplayName property displays the country/region name in the language of the localized version of the .NET Framework for Silverlight. For example, the DisplayName property displays the country/region in English on the English version of the .NET Framework, and in Spanish on the Spanish version of the .NET Framework.

The value of the DisplayName property is taken from the resource files in the language of the current user interface culture, represented by CurrentUICulture. Custom regions or those synthesized from the operating system might not have resource information, in which case the value for DisplayName is the same as the value of the NativeName property.

The following code example displays the properties of the RegionInfo class.


using System;
using System.Globalization;

public class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {
      // Displays the property values of the RegionInfo for "US".
      RegionInfo myRI1 = new RegionInfo("en-US");
      outputBlock.Text += String.Format("   Name:                         {0}\n", myRI1.Name);
      outputBlock.Text += String.Format("   DisplayName:                  {0}\n", myRI1.DisplayName);
      outputBlock.Text += String.Format("   EnglishName:                  {0}\n", myRI1.EnglishName);
      outputBlock.Text += String.Format("   IsMetric:                     {0}\n", myRI1.IsMetric);
      outputBlock.Text += String.Format("   TwoLetterISORegionName:       {0}\n", myRI1.TwoLetterISORegionName);
      outputBlock.Text += String.Format("   CurrencySymbol:               {0}\n", myRI1.CurrencySymbol);
      outputBlock.Text += String.Format("   ISOCurrencySymbol:            {0}\n", myRI1.ISOCurrencySymbol);
   }
}
/*
This code produces the following output.
   Name:                         US
   DisplayName:                  United States
   EnglishName:                  United States
   IsMetric:                     False
   TwoLetterISORegionName:       US
   CurrencySymbol:               $
   ISOCurrencySymbol:            USD
*/


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft