共用方式為


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; }
member this.CurrentCulture : System.Globalization.CultureInfo with get, set
Public Shared Property CurrentCulture As CultureInfo

屬性值

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

適用於

另請參閱