Bir TextBox'tan girilen cümlenin içindeki geçen harfleri otomatik olarak örneğin

Merhaba -- Bu cümleden

1 m
1 e
1 r
1 h
2 a
1 b

ve en çok geçen harfi bulan kodu yazmam lazım.


Dim text As String
Dim wtext As String
Dim i As Integer



Char[] text = TextBox1.Text.ToCharArray()
wtext = ""
For i = 0 i < text.Length i++

If (wtext.Contains(text[i]) = False) Then

MsgBox(text[i] + " harfinden " + text.Count(x => x == text[i]) + " tane var")
wtext += text[i].ToString()

End If

}
Next


Elimdeki kod bu