Skip to content

Instantly share code, notes, and snippets.

@bjornmicallef
Created February 28, 2020 16:46
Show Gist options
  • Save bjornmicallef/7cf3dfe485f6c326b239f646e794c074 to your computer and use it in GitHub Desktop.
Save bjornmicallef/7cf3dfe485f6c326b239f646e794c074 to your computer and use it in GitHub Desktop.
debugging better using breakpoints and the output window
class Program
{
static void Main(string[] args)
{
var status = "";
for (int i = 0; i < 1000; i++)
{
if (i < 100)
{
status = "first hundred";
}
else if (i < 200)
{
status = "second hundred";
}
else if (i < 300)
{
status = "third hundred";
}
else if (i < 1000)
{
status = "the rest";
}
}
System.Diagnostics.Debug.WriteLine("end of loop");
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment