I Im trying to read from one text file and write to another one. The file Im reading from has 2023 lines, and the file that I am writing to comes out with only 2008 lines. I cant figure out what is happening to the other line... Im losing them somewhere. What am I doing wrong?
thanks!
heres my code in C#.
static void Main(string[] args)
{
StreamWriter writer = new StreamWriter("C:/Users/Rafael/desktop/newfile.txt");
StreamReader reader = new StreamReader("C:/Users/Rafael/desktop/new1.txt");//, System.Text.Encoding.GetEncoding("ISO-8859-1"));
string line;
while ((line = reader.ReadLine()) != null)
{
writer.WriteLine(line);
}
}