files! How to add new content without overwrite?
using (StreamWriter streamWriter = new StreamWriter("output.txt"))
{
foreach (var x in duplicates)
{
if (x.Contains(name))
{
streamWriter.WriteLine("********************");
streamWriter.WriteLine(x);
streamWriter.WriteLine(id);
streamWriter.WriteLine(fileName);
streamWriter.WriteLine("********************");
return true;
}
}
}
}
you are using wrong constructor for StreamWriter
Обсуждают сегодня