Skip to content

Instantly share code, notes, and snippets.

@valm
Created October 9, 2013 14:21
Show Gist options
  • Save valm/6902108 to your computer and use it in GitHub Desktop.
Save valm/6902108 to your computer and use it in GitHub Desktop.
Logging
Action<string> log;
Action clearLog;
log = (x =>
{
x = DateTime.Now.ToString(@"hh\:mm\:ss") + " " + x;
txtLog.AppendText(String.IsNullOrWhiteSpace(txtLog.Text) == false ? Environment.NewLine + x : x);
});
clearLog = (() => txtLog.Text = String.Empty);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment