Skip to content

Instantly share code, notes, and snippets.

@gabrielgreen
Created September 16, 2014 19:24
Show Gist options
  • Save gabrielgreen/329463a28cda9ebad2a5 to your computer and use it in GitHub Desktop.
Save gabrielgreen/329463a28cda9ebad2a5 to your computer and use it in GitHub Desktop.
quick console
private static readonly StringBuilder Sb = new StringBuilder();
private static void ShowResults()
{
const string outputFile = "output.txt";
File.WriteAllText(outputFile, Sb.ToString());
Process.Start("notepad", outputFile);
}
private static void PrintJson(string title, IEnumerable<object> objects)
{
Sb.AppendFormat("[{0}]", title);
foreach (var o in objects)
{
Sb.AppendLine(JsonConvert.SerializeObject(o, Formatting.Indented));
Sb.AppendLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment