This documentation is archived and is not being maintained.

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 ReadOnly Property CultureTypes As CultureTypes
Dim instance As CultureInfo
Dim value As CultureTypes

value = instance.CultureTypes

/** @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.

Imports System
Imports System.Globalization

Class Sample
    Public Shared 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
        Next ci
    End Sub 'Main
End Class 'Sample

'The following is a portion of the results produced by this code example.
'Culture: syr
'  NeutralCultures FrameworkCultures
'Culture: dv
'  NeutralCultures FrameworkCultures
'  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