Thursday, 15 January 2015

c# - Reading text file one line at a time -



c# - Reading text file one line at a time -

i have got text file number of commands parse through system. each line within text file command.

i read text file, 1 line @ time, each line command me deed on.

i have reached state lines read using streamreader.readline(), lines not read completely. within notepad, there appears nil wrong commands, , each 1 appears in 1 line supposed to.

however, when opening file notepad++, notice lf symbols within commands, instructs text editor start new command, so:

those lf misplaced (i.e. not want start new line when lf part of command). there way create streamreader interpret file notepad? there no line breaks in middle of commands within notepad.

if text 1 line skip using streamreader. instead can utilize

string sline = file.readalltext("test.txt"); sline = sline.replace("\n", "");

c# .net file stream ascii

No comments:

Post a Comment