Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CultureInfo.CultureTypes Property

Gets the culture types that pertain to the current CultureInfo object.

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

[ComVisibleAttribute(false)] 
public CultureTypes CultureTypes { get; }
/** @property */
public CultureTypes get_CultureTypes ()

public function get CultureTypes () : CultureTypes

Not applicable.

Property Value

A bitwise combination of one or more CultureTypes values. There is no default value.

The following code example demonstrates the CultureTypes enumeration and the CultureTypes property.

// This example demonstrates the CultureTypes enumeration 
// and the CultureInfo.CultureTypes property.

using System;
using System.Globalization;

class Sample 
{
    public static void Main() 
    {
// Create a table of most culture types. 
    CultureTypes[] mostCultureTypes = new CultureTypes[] {
                        CultureTypes.NeutralCultures, 
                        CultureTypes.SpecificCultures, 
                        CultureTypes.InstalledWin32Cultures, 
                        CultureTypes.UserCustomCulture, 
                        CultureTypes.ReplacementCultures, 
                        CultureTypes.FrameworkCultures,
                        CultureTypes.WindowsOnlyCultures
                        };
    CultureInfo[] allCultures;
    CultureTypes combo;

// Get and enumerate all cultures.
    allCultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
    foreach (CultureInfo ci in allCultures)
        {
// Display the name of each culture.
        Console.WriteLine("Culture: {0}", ci.Name);

// Get the culture types of each culture. 
        combo = ci.CultureTypes;

// Display the name of each culture type flag that is set.
        Console.Write("  ");
        foreach (CultureTypes ct in mostCultureTypes)
            if (0 != (ct & combo))
                Console.Write("{0} ", ct);
        Console.WriteLine();
        }
    }
}

/*
The following is a portion of the results produced by this code example.
.
.
.
Culture: syr
  NeutralCultures FrameworkCultures
Culture: dv
  NeutralCultures FrameworkCultures
Culture:
  SpecificCultures FrameworkCultures
Culture: ar-SA
  SpecificCultures FrameworkCultures
Culture: bg-BG
  SpecificCultures InstalledWin32Cultures FrameworkCultures
Culture: ca-ES
  SpecificCultures InstalledWin32Cultures FrameworkCultures
Culture: zh-TW
  SpecificCultures FrameworkCultures
.
.
.
*/

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft