How to print a specific string after you split the line from text file (closed) [closed]

you should change

MessageBox.Show(s[0]);

to

MessageBox.Show(s);

the reason is that after you split, each element in textsplit is a string that contains a complete word as you expected. However, you print s[0] – the first character of the word, so only the ‘h’ was print out.

Leave a Comment