TextInfo.LCID Property


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

 property int LCID { int get(); };
public int LCID { get; }
member this.LCID : int
Public ReadOnly Property LCID As Integer

Property Value

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. For detailed culture information for Windows systems, see the Language tag column in the list of language/region names supported by Windows. Culture names follow the standard defined by BCP 47.

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).

Applies to