0

hi everyone,
i need a windows application in which i have a textbox.my application is to convert the string entered in to textbox into words
for ex if i have enntered greey 1984 in textbox i shud get
greeny
1984
iam confused with the usage of strings
need u r help
bye
.

3
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by greeny_1984
0

you need the very simple String.Split() method.
your string will be the textbox.text field and the delimiter will be a space. This returns an array of strings.
This is C# but VB is 95% identical

//I did this the long way for you to follow
char[] delimiter = new char[1] {' '}; //thats your space
string[] words = string.split(textbox.text, delimiter);
// you now have an array of words.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.