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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET