다음을 통해 공유


Thread.CurrentCulture 속성

현재 스레드에 대한 culture를 가져오거나 설정합니다.

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

구문

‘선언
Public Property CurrentCulture As CultureInfo
‘사용 방법
Dim instance As Thread
Dim value As CultureInfo

value = instance.CurrentCulture

instance.CurrentCulture = value
public CultureInfo CurrentCulture { get; set; }
public:
property CultureInfo^ CurrentCulture {
    CultureInfo^ get ();
    void set (CultureInfo^ value);
}
/** @property */
public CultureInfo get_CurrentCulture ()

/** @property */
public void set_CurrentCulture (CultureInfo value)
public function get CurrentCulture () : CultureInfo

public function set CurrentCulture (value : CultureInfo)

속성 값

현재 스레드에 대한 culture를 나타내는 CultureInfo입니다.

예제

다음 코드 예제에서는 Windows Forms의 사용자 인터페이스가 제어판에 설정된 culture로 표시되도록 하는 스레딩 문을 보여 줍니다. 여기에는 추가 코드가 필요합니다.

' Compile with option t:winexe /r:System.dll,System.Windows.Forms.dll.

Option Explicit
Option Strict

Imports System
Imports System.Threading
Imports System.Windows.Forms

Public Class UICulture
    Inherits Form

    Sub New()

        ' 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.
    End Sub

    <STAThreadAttribute> Shared Sub Main()
        Application.Run(New UICulture())
    End Sub

End Class
// Compile with option /t:winexe.

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.
    }

    [STAThreadAttribute]
    static void Main()
    {
        Application.Run(new UICulture());
    }
}
#using <system.dll>
#using <System.Drawing.dll>
#using <system.windows.forms.dll>

using namespace System;
using namespace System::Threading;
using namespace System::Windows::Forms;
ref class UICulture: public 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.
   }

};


[STAThreadAttribute]
int main()
{
   Application::Run( gcnew UICulture );
}
// Compile with option /t:winexe.
import System.*;
import System.Threading.*;
import System.Threading.Thread;
import System.Windows.Forms.*;

class UICulture extends Form
{
    public UICulture()
    {
        // Set the user interface to display in the
        // same culture as that set in Control Panel.
        Thread.get_CurrentThread().set_CurrentUICulture(
            Thread.get_CurrentThread().get_CurrentCulture());
        // Add additional code.
    } //UICulture


    /** @attribute STAThreadAttribute()
     */
    public static void main(String[] args)
    {
        Application.Run(new UICulture());
    } //main
} //UICulture

.NET Framework 보안

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

Thread 클래스
Thread 멤버
System.Threading 네임스페이스