Thread.CurrentCulture プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Thread.CurrentCulture プロパティの意味・解説 

Thread.CurrentCulture プロパティ

現在のスレッドのカルチャを取得または設定します

名前空間: 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)

プロパティ
現在のスレッドのカルチャを表す CultureInfo。

使用例使用例

コントロール パネル設定したカルチャで Windows フォームユーザー インターフェイス表示するためのスレッド ステートメントの例を次に示します。このコードには、追加コードが必要です。

' 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 のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Thread.CurrentCulture プロパティ」の関連用語

Thread.CurrentCulture プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Thread.CurrentCulture プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS