Esempio n. 1
0
 public void AddToLog(string entry)
 {
     try
     {
         TbMain.Invoke(new Action(() => TbMain.AppendText(entry + Environment.NewLine)));
     }
     catch { }
 }
Esempio n. 2
0
        public void AddToLog(string entry)
        {
            try
            {
                TbMain.Invoke(new Action(() => TbMain.AppendText(entry + Environment.NewLine)));
            }
            catch { }


            using (var sw = File.AppendText("log.txt"))
            {
                sw.WriteLine(entry);
            }
        }