Log feature (Writing in a file)

public static void Log(string str)   

{        StreamWriter Tex = File.AppendText(“LogFile.txt”);       

Tex.WriteLine(DateTime.Now.ToString() +” “+ str);        Tex.Close(); 

    }

Leave a Comment