InputLanguage.Culture Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Colaborar conosco no GitHub
A fonte deste conteúdo pode ser encontrada no GitHub, onde você também pode criar e revisar problemas e solicitações de pull. Para obter mais informações, confira o nosso guia para colaboradores.