C# Help, Reading Files

02/27/2010 09:43 Korvacs#16
Unless your always going to have less than 255 words in your text file you should probably change that byte i declaration to an int.
02/27/2010 12:03 tanelipe#17
I just realised I had it splitting by new lines, replace the '\n' with ' ' (or " ") if you're using my version.
02/27/2010 17:24 PeTe Ninja#18
yah i was wondering why u were trying to split lines again
02/27/2010 18:39 xScott#19
yeah i wanted less then 255 lines
02/27/2010 18:42 _tao4229_#20
Code:
string[] words = File.ReadAllText(@"\file.txt").Split('\n', ' ');
Edit: You might also have to remove the return character.