c# - Readline command is skipping lines -
i'm trying read data .txt
file , place in list of class instances. while debugging, noticed readline()
command skipping lines of .txt
file. have idea why happening , how remedy situation?
string logpath; string defaultpath; string line; openfiledialog openlog = new openfiledialog(); openlog.filter = "txt files (*.txt)|*.txt|all files (*.*)|*.*"; if (openlog.showdialog() == dialogresult.ok) { logpath = openlog.filename; logtextbox.text = logpath; defaultpath = logpath.substring(0, logpath.lastindexof("\\")); streamreader logstream = new streamreader(logpath); while (!logstream.endofstream) { line = logstream.readline(); console.writeline(line); } }
Comments
Post a Comment