Create FileStream for ASCII encoding
using System;
using System.IO;
using System.Text;
class FSOpenWrite
{
public static void Main()
{
FileStream fs=new FileStream("c:\\Variables.txt", FileMode.Append, FileAccess.Write, FileShare.Write);
fs.Close();
StreamWriter sw=new StreamWriter("c:\\Variables.txt", true, Encoding.ASCII);
string NextLine="This is the appended line.";
sw.Write(NextLine);
sw.Close();
}
}
Related examples in the same category