c# write streamwriter code example
Example 1: c# streamwriter
// The StreamReader are using the Namespaces: System and system.IO
using (StreamWriter sw = new StreamWriter("c:\WriteLines.txt")) //path
{
sw.WriteLine("Here goes the text");
}
Example 2: creating a streamwiter file C#
StreamWiter writer = new StreamWriter ("Rainfall.txt", true);
writer.WriteLine("")