public void AddToLog(string entry) { try { TbMain.Invoke(new Action(() => TbMain.AppendText(entry + Environment.NewLine))); } catch { } }
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); } }