You have two methods: you can append the text, using
File.AppendText Method (String) (System.IO)[
^] or by using a stream with the Append option:
using (FileStream fs = new FileStream(fileName,FileMode.Append, FileAccess.Write))
{
using (StreamWriter sw = new StreamWriter(fs))
{
sw.WriteLine(myNewCSVLine);
}
}
The only other way is to read the entire file (using a string collection, or a CSVReader) append your data, and write it all back to a new file.