Uredi

Deli z drugimi prek


InputLanguage.Culture Property

Definition

Gets the culture of the current input language.

public:
 property System::Globalization::CultureInfo ^ Culture { System::Globalization::CultureInfo ^ get(); };
public System.Globalization.CultureInfo Culture { get; }
member this.Culture : System.Globalization.CultureInfo
Public ReadOnly Property Culture As CultureInfo

Property Value

A CultureInfo that represents the culture of the current input language.

Examples

The following code example gets the InputLanguage for the current input language. A text box displays this input language and the name of the input language.

This code assumes that textBox1 has been instantiated.

public:
   void MyCulture()
   {
      // Gets the current input language.
      InputLanguage^ myCurrentLanguage = InputLanguage::CurrentInputLanguage;
      
      // Gets the culture for the language  and prints it.
      CultureInfo^ myCultureInfo = myCurrentLanguage->Culture;
      textBox1->Text = myCultureInfo->EnglishName;
   }
public void MyCulture() {
   // Gets the current input language.
   InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;

   // Gets the culture for the language  and prints it.
   CultureInfo myCultureInfo = myCurrentLanguage.Culture;
   textBox1.Text = myCultureInfo.EnglishName;
}
Public Sub MyCulture()
   ' Gets the current input language.
   Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage
       
   ' Gets the culture for the language  and prints it.
   Dim myCultureInfo As CultureInfo = myCurrentLanguage.Culture
   textBox1.Text = myCultureInfo.EnglishName
End Sub

Applies to

See also