Export (0) Print
Expand All

Application.CurrentCulture Property

Gets or sets the culture information for the current thread.

[Visual Basic]
Public Shared Property CurrentCulture As CultureInfo
[C#]
public static CultureInfo CurrentCulture {get; set;}
[C++]
public: __property static CultureInfo* get_CurrentCulture();
public: __property static void set_CurrentCulture(CultureInfo*);
[JScript]
public static function get CurrentCulture() : CultureInfo;
public static function set CurrentCulture(CultureInfo);

Property Value

A CultureInfo representing the culture information for the current thread.

Example

[Visual Basic, C#, C++] The following example gets this property and displays its value in a text box. The example assumes that textBox1 has been placed on a form.

[Visual Basic] 
Private Sub PrintCurrentCulture()
   textBox1.Text = "The current culture is: " & _
      Application.CurrentCulture.EnglishName
End Sub
  

[C#] 
private void PrintCurrentCulture() {
    textBox1.Text = "The current culture is: " +
       Application.CurrentCulture.EnglishName;
 }
   

[C++] 
private:
   void PrintCurrentCulture() {
      textBox1->Text = S"The current culture is: {0}", Application::CurrentCulture->EnglishName;
   }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Application Class | Application Members | System.Windows.Forms Namespace | InputLanguage

Show:
© 2014 Microsoft