Thursday, April 25, 2013

append text in file ,append string text to the text File, insert string to the file


private void WriteToLog(string file, string message)
        {
            using (StreamWriter w = File.AppendText(file))
            {
                w.WriteLine( DateTime.Now.ToString() + ": " + message); w.Close();
            }
        }

No comments:

Post a Comment