CultureInfo.CultureTypes 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
현재 CultureInfo 개체와 관련된 문화권 형식을 가져옵니다.
public:
property System::Globalization::CultureTypes CultureTypes { System::Globalization::CultureTypes get(); };
public System.Globalization.CultureTypes CultureTypes { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public System.Globalization.CultureTypes CultureTypes { get; }
member this.CultureTypes : System.Globalization.CultureTypes
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.CultureTypes : System.Globalization.CultureTypes
Public ReadOnly Property CultureTypes As CultureTypes
속성 값
하나 이상의 CultureTypes 값의 비트 조합입니다. 기본값은 없습니다.
- 특성
예제
다음 예제에서는 CultureTypes 열거형 및 속성을 보여 줍니다 CultureTypes .
using System;
using System.Globalization;
class Sample
{
public static void Main()
{
// Get and enumerate all cultures.
var allCultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
foreach (var ci in allCultures)
{
// Display the name of each culture.
Console.Write($"{ci.EnglishName} ({ci.Name}): ");
// Indicate the culture type.
if (ci.CultureTypes.HasFlag(CultureTypes.NeutralCultures))
Console.Write(" NeutralCulture");
if (ci.CultureTypes.HasFlag(CultureTypes.SpecificCultures))
Console.Write(" SpecificCulture");
Console.WriteLine();
}
}
}
/*
The following is a portion of the output from this example.
Tajik (tg): NeutralCulture
Tajik (Cyrillic) (tg-Cyrl): NeutralCulture
Tajik (Cyrillic, Tajikistan) (tg-Cyrl-TJ): SpecificCulture
Thai (th): NeutralCulture
Thai (Thailand) (th-TH): SpecificCulture
Tigrinya (ti): NeutralCulture
Tigrinya (Eritrea) (ti-ER): SpecificCulture
Tigrinya (Ethiopia) (ti-ET): SpecificCulture
Tigre (tig): NeutralCulture
Tigre (Eritrea) (tig-ER): SpecificCulture
Turkmen (tk): NeutralCulture
Turkmen (Turkmenistan) (tk-TM): SpecificCulture
Setswana (tn): NeutralCulture
Setswana (Botswana) (tn-BW): SpecificCulture
Setswana (South Africa) (tn-ZA): SpecificCulture
*/
Imports System.Globalization
Module Module1
Public Sub Main()
' Get and enumerate all cultures.
Dim allCultures = CultureInfo.GetCultures(CultureTypes.AllCultures)
For Each ci In allCultures
' Display the name of each culture.
Console.Write($"{ci.EnglishName} ({ci.Name}): ")
' Indicate the culture type.
If ci.CultureTypes.HasFlag(CultureTypes.NeutralCultures) Then
Console.Write(" NeutralCulture")
End If
If ci.CultureTypes.HasFlag(CultureTypes.SpecificCultures) Then
Console.Write(" SpecificCulture")
End If
Console.WriteLine()
Next
End Sub
End Module
' The following is a portion of the output from this example.
' Tajik (tg): NeutralCulture
' Tajik (Cyrillic) (tg-Cyrl): NeutralCulture
' Tajik (Cyrillic, Tajikistan) (tg-Cyrl-TJ): SpecificCulture
' Thai (th): NeutralCulture
' Thai (Thailand) (th-TH): SpecificCulture
' Tigrinya (ti): NeutralCulture
' Tigrinya (Eritrea) (ti-ER): SpecificCulture
' Tigrinya (Ethiopia) (ti-ET): SpecificCulture
' Tigre (tig): NeutralCulture
' Tigre (Eritrea) (tig-ER): SpecificCulture
' Turkmen (tk): NeutralCulture
' Turkmen (Turkmenistan) (tk-TM): SpecificCulture
' Setswana (tn): NeutralCulture
' Setswana (Botswana) (tn-BW): SpecificCulture
' Setswana (South Africa) (tn-ZA): SpecificCulture
적용 대상
추가 정보
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET