TextInfo.LCID Property


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

Gets the culture identifier for the culture associated with the current TextInfo object.

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

public int LCID { get; }

Property Value

Type: System.Int32

A number that identifies the culture from which the current TextInfo object was created.

Certain predefined culture names and identifiers are used by this and other classes in the System.Globalization namespace, as well as the Windows API. The detailed culture information is defined in the National Language Support (NLS) API Reference topic at the Go Global Developer Center.

The LCID property always reflects a specific culture identifier instead of a neutral culture identifier. If CultureInfo.LCID is set to a neutral culture identifier, the corresponding LCID has as its value an arbitrary specific culture identifier that uses the same language. For example, the CultureInfo.LCID property returns 0x0009 for the English neutral culture, named "en". However, the corresponding LCID property might return 0x0409 for the English (United States) culture, named en-US.

Similarly, the LCID property always corresponds to a default sort order, and never reflects a specific sort order. For example, the default sort order for Spanish (Spain) is the international sort order. If CultureInfo.LCID is set to "0x040A" (Spanish with the traditional sort order), the corresponding LCID value is "0x0C0A" (Spanish with the default international sort order).

.NET Framework
Available since 2.0
Return to top