|
-
Oct 6th, 2003, 01:48 PM
#1
Thread Starter
Lively Member
Reading words from text files
I want to read a text file consisting of single words on a line each e.g.
apple
pear
orange
banana
... and put the words into a string array.
So far I've come up with:
string[] sK;
StreamReader K = new StreamReader(sFile);
sK = K.ReadToEnd().Split('\n');
But, in the Autos window, I can see that each word has come out like this:
appleX
pearX
orangeX
bananaX
(where X is a box shaped character).
What is it and how could I remove it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|