23 July 2016

Create Text file (or any basic format files) in C#

using System.IO;

            StreamWriter File = new StreamWriter("Bar.txt");
            File.Write("<html>");
            File.Write("<title>Test File</title>");
            File.Write("<head></head>");
            File.Write("<body bgcolor=blue>Hai This is Test Body</body></html>");
            File.Close();
            System.Diagnostics.Process.Start("Bar.txt");


Suggest Blog for daily News in Tamil: tamizhnewz.blogspot.in

No comments:

Post a Comment