using (System.IO.FileStream fs = new System.IO.FileStream(Server.MapPath("~/data.txt"), System.IO.FileMode.Append, System.IO.FileAccess.Write, System.IO.FileShare.Read, 8, System.IO.FileOptions.None)) { byte[] data = System.Text.Encoding.ASCII.GetBytes("data123"); fs.Write(data, 0, data.Length); fs.Flush(); fs.Close(); }
string[] lines = File.ReadAllLines(Server.MapPath("~/data.txt"));
File.ReadAllLines
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)