Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
NativeName Property

RegionInfo.NativeName Property

Gets the name of a country/region formatted in the native language of the country/region.

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

[ComVisibleAttribute(false)]
public virtual string NativeName { get; }

Property Value

Type: System.String
The native name of the country/region formatted in the language associated with the ISO 3166 country/region code.

NoteNote:

The NativeName property retrieves a localized region name if the RegionInfo object is constructed using a full culture name.

Whenever possible, you should use the full culture name, such as "en-US", when instantiating a RegionInfo object, because the string returned by the NativeName property depends on the language associated with the country/region. For example, the cultures "en-US" and "es-US" on Windows Vista can retrieve different values. Therefore, creating the RegionInfo object with only a country/region name, such as "US" in this case, is not specific enough to distinguish the appropriate string.

The following code example demonstrates the NativeName property.


using System;
using System.Globalization;

class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {
      RegionInfo ri = new RegionInfo("sv-SE");   // Sweden

      outputBlock.Text += String.Format("Region English Name: . . . {0}", ri.EnglishName) + "\n";
      outputBlock.Text += String.Format("Native Name: . . . . . . . {0}", ri.NativeName) + "\n";
      outputBlock.Text += String.Format("Currency Symbol: . . . . . {0} ({1})", 
                                        ri.CurrencySymbol, ri.ISOCurrencySymbol) + "\n";
   }
}
/*
This code example produces the following results:
      Region English Name: . . . Sweden
      Native Name: . . . . . . . Sverige
      Currency Native Name:. . . kr (SEK)
*/


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.

Community Additions

ADD
Show:
© 2015 Microsoft