.NET Framework Class Library
CultureInfoCultureTypes Property

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

Namespace:   System.Globalization
Assembly:  mscorlib (in mscorlib.dll)
Syntax
<[%$TOPIC/ms143067_en-us_VS_110_2_0_0_0_0%](False)> _
Public ReadOnly Property CultureTypes As [%$TOPIC/ms143067_en-us_VS_110_2_0_0_0_1%]
[[%$TOPIC/ms143067_en-us_VS_110_2_0_1_0_0%](false)]
public [%$TOPIC/ms143067_en-us_VS_110_2_0_1_0_1%] CultureTypes { get; }
[[%$TOPIC/ms143067_en-us_VS_110_2_0_2_0_0%](false)]
public:
property [%$TOPIC/ms143067_en-us_VS_110_2_0_2_0_1%] CultureTypes {
	[%$TOPIC/ms143067_en-us_VS_110_2_0_2_0_2%] get ();
}
[<[%$TOPIC/ms143067_en-us_VS_110_2_0_3_0_0%](false)>]
member CultureTypes : [%$TOPIC/ms143067_en-us_VS_110_2_0_3_0_1%] with get
function get CultureTypes () : [%$TOPIC/ms143067_en-us_VS_110_2_0_4_0_0%]

Property Value

Type: System.GlobalizationCultureTypes
A bitwise combination of one or more CultureTypes values. There is no default value.
Examples

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

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

Imports System
Imports System.Globalization

Module Module1
    Public Sub Main()

        ' Create a table of most culture types.  
        Dim mostCultureTypes() As CultureTypes = { _
                CultureTypes.NeutralCultures, _
                CultureTypes.SpecificCultures, _
                CultureTypes.InstalledWin32Cultures, _
                CultureTypes.UserCustomCulture, _
                CultureTypes.ReplacementCultures, _
                CultureTypes.FrameworkCultures, _
                CultureTypes.WindowsOnlyCultures}
        Dim allCultures() As CultureInfo
        Dim combo As CultureTypes

        ' Get and enumerate all cultures.
        allCultures = CultureInfo.GetCultures(CultureTypes.AllCultures)
        Dim ci As CultureInfo
        For Each 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("  ")
            Dim ct As CultureTypes
            For Each ct In mostCultureTypes
                If 0 <> (ct And combo) Then
                    Console.Write("{0} ", ct)
                End If 
            Next ct
            Console.WriteLine()
        Next ci

    End Sub 'Main 
End Module 

'The following is a portion of the results produced by this code example. 
'. 
'. 
'. 
'Culture: tg 
'  NeutralCultures InstalledWin32Cultures  
'Culture: ta 
'  NeutralCultures InstalledWin32Cultures FrameworkCultures  
'Culture: te 
'  NeutralCultures InstalledWin32Cultures FrameworkCultures  
'Culture: syr 
'  NeutralCultures InstalledWin32Cultures FrameworkCultures  
'Culture: tg-Cyrl-TJ 
'  SpecificCultures InstalledWin32Cultures  
'Culture: ta-IN 
'  SpecificCultures InstalledWin32Cultures FrameworkCultures  
'Culture: te-IN 
'  SpecificCultures InstalledWin32Cultures FrameworkCultures  
'Culture: syr-SY 
'  SpecificCultures InstalledWin32Cultures FrameworkCultures  
'Culture: tg-Cyrl 
'  NeutralCultures InstalledWin32Cultures  
'. 
'. 
'.
// 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: tg
  NeutralCultures InstalledWin32Cultures 
Culture: ta
  NeutralCultures InstalledWin32Cultures FrameworkCultures 
Culture: te
  NeutralCultures InstalledWin32Cultures FrameworkCultures 
Culture: syr
  NeutralCultures InstalledWin32Cultures FrameworkCultures 
Culture: tg-Cyrl-TJ
  SpecificCultures InstalledWin32Cultures 
Culture: ta-IN
  SpecificCultures InstalledWin32Cultures FrameworkCultures 
Culture: te-IN
  SpecificCultures InstalledWin32Cultures FrameworkCultures 
Culture: syr-SY
  SpecificCultures InstalledWin32Cultures FrameworkCultures 
Culture: tg-Cyrl
  NeutralCultures InstalledWin32Cultures 
.
.
.
*/
// This example demonstrates the CultureTypes enumeration  
// and the CultureInfo.CultureTypes property. 

using namespace System;
using namespace System::Globalization;
int main()
{
    // Create a table of most culture types.  
    array<CultureTypes>^ mostCultureTypes = gcnew array<CultureTypes> {
                    CultureTypes::NeutralCultures, 
                    CultureTypes::SpecificCultures, 
                    CultureTypes::InstalledWin32Cultures, 
                    CultureTypes::UserCustomCulture, 
                    CultureTypes::ReplacementCultures, 
                    CultureTypes::FrameworkCultures,
                    CultureTypes::WindowsOnlyCultures
                    };
    CultureTypes combo;

    // Get and enumerate all cultures.
    System::Collections::IEnumerator^ enum0 = CultureInfo::GetCultures(CultureTypes::AllCultures)->GetEnumerator();
    while (enum0->MoveNext())
    {
        // Display the name of each culture.
        CultureInfo^ ci = safe_cast<CultureInfo^>(enum0->Current);
        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("  ");
        for each (CultureTypes ct in mostCultureTypes)
            if ((ct & combo) != CultureTypes())
                Console::Write("{0} ", ct);
        Console::WriteLine();
    }
}

/*
The following is a portion of the results produced by this code example.
.
.
.
Culture: tg
  NeutralCultures InstalledWin32Cultures 
Culture: ta
  NeutralCultures InstalledWin32Cultures FrameworkCultures 
Culture: te
  NeutralCultures InstalledWin32Cultures FrameworkCultures 
Culture: syr
  NeutralCultures InstalledWin32Cultures FrameworkCultures 
Culture: tg-Cyrl-TJ
  SpecificCultures InstalledWin32Cultures 
Culture: ta-IN
  SpecificCultures InstalledWin32Cultures FrameworkCultures 
Culture: te-IN
  SpecificCultures InstalledWin32Cultures FrameworkCultures 
Culture: syr-SY
  SpecificCultures InstalledWin32Cultures FrameworkCultures 
Culture: tg-Cyrl
  NeutralCultures InstalledWin32Cultures 
.
.
.
*/
Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1