Lets say i have a textbox containing the string "hello".
Is there a way in which can i check that the 3rd character of textbox.text = "l"?
We are talking about visual basic, of course.
You could use this function
Private Function checkCharacter(thisString As String, searchCharacter As Char, index As Integer) Try Return thisString(index) = searchCharacter Catch Return False End Try End Function
Call it like this
Dim result As Boolean = checkCharacter(TextBox1.Text, "l"c, 2)