CultureInfo::ToString Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a string containing the name of the current CultureInfo in the format languagecode2-country/regioncode2.

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

public:
virtual String^ ToString() override

Return Value

Type: System::String^

A string containing the name of the current CultureInfo.

This method overrides Object::ToString. It returns a normalized version of the culture name that is passed to the CultureInfo(String^) or CultureInfo(String^, Boolean) constructor or to the CreateSpecificCulture or GetCultureInfo(String^) method. It normalizes the result string by converting characters in languagecode2 to lowercase and converting characters in country/regioncode2 to uppercase if necessary.

Predefined culture names are listed in the National Language Support (NLS) API Reference page at the Go Global Developer Center.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
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: