using (strwrtr = new StreamWriter(filename,true)) code example
Example: creating a streamwiter file C#
StreamWiter writer = new StreamWriter ("Rainfall.txt", true);
writer.WriteLine("")
StreamWiter writer = new StreamWriter ("Rainfall.txt", true);
writer.WriteLine("")