CSharp examples for System.IO:Text File
Save Contents As File
using System.Text; using System.IO;//from ww w. j av a 2 s.c om public class Main{ public static void SaveContentsAsFile(string content, string path) { byte[] info = new UTF8Encoding(true).GetBytes(content); FileStream fs = File.Create(path); fs.Write(info, 0, info.Length); fs.Close(); } }