Groß-und Kleinschreibung

If TextBox2.Text = "a" AndAlso TextBox21.Text = "a" Then
        'MessageBox.Show("A")
        totCorrect = totCorrect + corAns
    ElseIf TextBox2.Text = "b" AndAlso TextBox21.Text = "b" Then
        'MessageBox.Show("B")
        totCorrect = totCorrect + corAns
    ElseIf TextBox2.Text = "c" AndAlso TextBox21.Text = "c" Then
        'MessageBox.Show("C")
        totCorrect = totCorrect + corAns
    ElseIf TextBox2.Text = "d" AndAlso TextBox21.Text = "d" Then
        'MessageBox.Show("D")
        totCorrect = totCorrect + corAns
    Else
        totWrong = totWrong + wrgAns
        Label13.Visible = True
    End If

Ich versuche, die Buchstaben a,b,c,d, die der Benutzer eingibt unempfindlich. Versucht, verwenden Sie die Funktionen UCase, aber es hat nicht funktioniert (nicht sicher, ob ich es falsch). Ich bin in Visual Studio 2012 und mit VB. Jegliche Hinweise wäre toll.

Siehe: msdn.microsoft.com/en-us/library/...
Danke, das war sehr hilfreich

InformationsquelleAutor Brandon | 2013-03-25

Schreibe einen Kommentar