help for newbi neede

  • Thread starter Thread starter Coffee
  • Start date Start date
C

Coffee

i want to transfer the content of a text box/message box to a string
array. like i have the word "hellO" and want the h to be myvariable(1),
the e myvariable(2) the l myvariable(3) and so on... can i read out text
box positions? like textbox.capture.position.1 or somehow like this??
thanx
 
I'm going to make an inherited textbox that has the method capture just
because you put it here. =)

Actually, Textbox.Text is of type String

So you can just use

Dim myArray() as String

myArray = textbox.text.toCharArray

-CJ
 
Coffee said:
i want to transfer the content of a text box/message box to a string
array. like i have the word "hellO" and want the h to be
myvariable(1),
the e myvariable(2) the l myvariable(3) and so on... can i read out
text box positions? like textbox.capture.position.1 or somehow like
this?? thanx


Don't know if I got it, but I think the Chars property of a string returns
the char at the given position.
 
Coffee said:
i want to transfer the content of a text box/message box to a string
array. like i have the word "hellO" and want the h to be
myvariable(1), the e myvariable(2) the l myvariable(3) and so
on... can i read out text box positions? like
textbox.capture.position.1 or somehow like this??

I think it's better to use a character array for this purpose:

\\\
Dim achr() As Char = Me.TextBox1.Text.ToCharArray()
///
 
Hi Coffee,
Because there are so many answers, the string itself was (and is) one of the
first arrays, but mostly we don't think about it in that way.
It is an array of characters.
Cor
 
Back
Top