My case is a little complex.
There is a while loop outside of foreach query, your File.WriteAllLines will create a new file. I just want to append line to the existing file.
while (!hasHitEnd)
{
foreach (var y in query)
{
TextWriter tw = new StreamWriter(outputFileName, true);
tw.WriteLine(y.Path + "_" + y.Name);
tw.Close();
}
}
There is a while loop outside of foreach query, your File.WriteAllLines will create a new file. I just want to append line to the existing file.
No comments:
Post a Comment