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

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -