Share via


ToString Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Syntax

'Declaration
Public Overrides Function ToString As String
public override string ToString()
public:
virtual String^ ToString() override
abstract ToString : unit -> string 
override ToString : unit -> string 
public override function ToString() : String

Return Value

Type: System. . :: . .String
A string containing the name of the current CultureInfo.

Remarks

This method overrides Object..::..ToString. It returns a normalized version of the culture name that is passed to the CultureInfo(String) or #ctor(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.

.NET Framework Security

See Also

Reference

CultureInfo Class

System.Globalization Namespace