CultureInfo.GetCultures Method (CultureTypes)
Gets the list of supported cultures filtered by the specified CultureTypes parameter.
Assembly: mscorlib (in mscorlib.dll)
A bitwise combination of the enumeration values that filter the cultures to retrieve.
Return ValueType: System.Globalization.CultureInfo
An array that contains the cultures specified by the types parameter. The array of cultures is unsorted.
Themethod is most commonly called with the types parameter set to the following values:
SpecificCultures, which returns all specific cultures.
NeutralCultures, which returns all neutral cultures and the invariant culture.
AllCultures, which returns all neutral and specific cultures, cultures installed in the Windows system, and custom cultures created by the user.
UserCustomCulture, which returns all custom cultures, such as those registered by the CultureAndRegionInfoBuilder class. In versions of Windows before Windows 10, the UserCustomCulture value applies to all user-defined custom cultures. Starting with Windows 10, it applies to system cultures that lack complete cultural data and that do not have a unique local identifier, as indicated by the LCID property value. As a result, code such as the following will return different results when run on Windows 10 and on an earlier version of Windows.
The following code example displays several properties of the neutral cultures.
The example displays the zh-CHS and zh-CHT cultures with the 0x0004 and 0x7C04 culture identifiers, respectively. However, your Windows Vista applications should use the zh-Hans name instead of zh-CHS and the zh-Hant name instead of zh-CHT. The zh-Hans and zh-Hant names represent the current standard, and should be used unless you have a reason for using the older names.
Available since 1.1