Consider:
char [] chararray = txt1.Text;
How we do the same in Visual Basic 6.0?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That depends on what you eventually want to do.
You can, for example, do this in VB6:
That way the
barray will be resized to hold the Unicode data from"string"— but then each character will be split across two bytes which is probably not what you want. This trick only works withByte.You also can do that:
Each letter will now occupy one byte, but the extended characters will be gone. Only do this if the current system code page contains the required characters.
You can copy the characters manually to an array:
Or you can even avoid creating an array at all, becase
Midalso serves as an indexer operator that changes a character in place, without copying or allocating anything: