이 문서는 기계 번역을 이용하여 번역되었습니다. 문서를 영문으로 보려면 영문 확인란을 선택하세요. 마우스 포인터를 텍스트 위로 이동시켜 팝업 창에서 영문 텍스트를 표시할 수도 있습니다.
번역
영문

Thread.CurrentCulture 속성

 

게시 날짜: 2016년 11월

현재 스레드에 대한 문화권을 가져오거나 설정합니다.

네임스페이스:   System.Threading
어셈블리:  mscorlib(mscorlib.dll에 있음)

public CultureInfo CurrentCulture {
	get;
	[SecurityPermissionAttribute(SecurityAction.Demand, ControlThread = true)]
	set;
}

속성 값

Type: System.Globalization.CultureInfo

현재 스레드에 대한 문화권을 나타내는 개체입니다.

Exception Condition
ArgumentNullException

속성이 null로 설정됩니다.

The T:System.Globalization.CultureInfo object that is returned by this property, together with its associated objects, determine the default format for dates, times, numbers, currency values, the sorting order of text, casing conventions, and string comparisons. See the T:System.Globalization.CultureInfo class to learn about culture names and identifiers, the differences between invariant, neutral, and specific cultures, and the way culture information affects threads and application domains. See the P:System.Globalization.CultureInfo.CurrentCulture property to learn how a thread's default culture is determined, and how users set culture information for their computers.

Beginning with the net_v40_long, you can set the P:System.Threading.Thread.CurrentCulture property to a neutral culture. This is because the behavior of the T:System.Globalization.CultureInfo class has changed: When it represents a neutral culture, its property values (in particular, the P:System.Globalization.CultureInfo.Calendar, P:System.Globalization.CultureInfo.CompareInfo, P:System.Globalization.CultureInfo.DateTimeFormat, P:System.Globalization.CultureInfo.NumberFormat, and P:System.Globalization.CultureInfo.TextInfo properties) now reflect the specific culture that is associated with the neutral culture. In earlier versions of the .NET Framework, the P:System.Threading.Thread.CurrentCulture property threw a T:System.NotSupportedException exception when a neutral culture was assigned.

The following code example shows the threading statement that allows the user interface of a Windows Forms to display in the culture that is set in Control Panel. Additional code is needed.

using System;
using System.Threading;
using System.Windows.Forms;

class UICulture : Form
{
    public UICulture()
    {
        // Set the user interface to display in the
        // same culture as that set in Control Panel.
        Thread.CurrentThread.CurrentUICulture = 
            Thread.CurrentThread.CurrentCulture;

        // Add additional code.
    }

    static void Main()
    {
        Application.Run(new UICulture());
    }
}

SecurityPermission

for setting the property. Associated enumeration: F:System.Security.Permissions.SecurityPermissionFlag.ControlThread

.NET Framework
1.1 이후 사용 가능
이식 가능한 클래스 라이브러리
이식 가능한 .NET 플랫폼 에서 지원됨
Silverlight
2.0 이후 사용 가능
Windows Phone Silverlight
7.0 이후 사용 가능
맨 위로 이동
표시: