Reputation: 21
Not a string, just a keyboard character in a text box. So i don't want this code.
For each c as char in textbox1.text
Next
I want to simply know the code for converting a single character in the text box, one at a time.
Upvotes: 1
Views: 332
Reputation: 540
A single character in a textbox will still end up as a string. Once you've checked that the string has a length of 1, you can convert it to a char by getting the first (only) char in the string:
char theCharacter = stringFromTextbox[0];
Upvotes: 1