Windows apps
Collapse the table of content
Expand the table of content
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::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)

public:
[ComVisibleAttribute(false)]
property String^ NativeName {
	virtual String^ 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.

System_CAPS_noteNote

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

We recommend that you use the culture name—for example, "en-US" for English (United States)—to access the NativeName property. The string used for this property depends on the language associated with the country/region. For example, the culture names en-US for English (United States) and es-US for Spanish (United States) can retrieve different values on Windows Vista. Therefore, creating the RegionInfo object with only a country/region name of US is not specific enough to distinguish the appropriate string.

The following code example demonstrates the NativeName property.

// This example demonstrates the RegionInfo.EnglishName, NativeName,
// CurrencyEnglishName, CurrencyNativeName, and GeoId properties.

using namespace System;
using namespace System::Globalization;

int main()
{
    // Regional Info for Sweden
    RegionInfo^ ri = gcnew RegionInfo("SE");

    Console::Clear();
    Console::WriteLine("Region English Name: . . . {0}", ri->EnglishName);
    Console::WriteLine("Native Name: . . . . . . . {0}", ri->NativeName);
    Console::WriteLine("Currency English Name: . . {0}",
        ri->CurrencyEnglishName);
    Console::WriteLine("Currency Native Name:. . . {0}",
        ri->CurrencyNativeName);
    Console::WriteLine("Geographical ID: . . . . . {0}", ri->GeoId);
}
/*
This code example produces the following results:

Region English Name: . . . Sweden
Native Name: . . . . . . . Sverige
Currency English Name: . . Swedish Krona
Currency Native Name:. . . Svensk krona
Geographical ID: . . . . . 221

*/

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft