Application.CurrentCulture 属性

定义

获取或设置当前线程的区域性信息。

public:
 static property System::Globalization::CultureInfo ^ CurrentCulture { System::Globalization::CultureInfo ^ get(); void set(System::Globalization::CultureInfo ^ value); };
public static System.Globalization.CultureInfo CurrentCulture { get; set; }
static member CurrentCulture : System.Globalization.CultureInfo with get, set
Public Shared Property CurrentCulture As CultureInfo

属性值

一个 CultureInfo,它代表当前线程的区域性信息。

示例

下面的代码示例获取此属性并在文本框中显示其值。 该示例要求 textBox1 已放置在窗体上。

private:
   void PrintCurrentCulture()
   {
      textBox1->Text = "The current culture is: {0}",
         Application::CurrentCulture->EnglishName;
   }
private void PrintCurrentCulture() {
    textBox1.Text = "The current culture is: " +
       Application.CurrentCulture.EnglishName;
 }
Private Sub PrintCurrentCulture()
   textBox1.Text = "The current culture is: " & _
      Application.CurrentCulture.EnglishName
End Sub

适用于

另请参阅