Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Created July 22, 2017 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiannagel/efabd530c90a69fe012ce0f36bd5e5e0 to your computer and use it in GitHub Desktop.
Save christiannagel/efabd530c90a69fe012ce0f36bd5e5e0 to your computer and use it in GitHub Desktop.
Endless recursive call until stack ends
public static void WhenDoesItEnd()
{
Console.WriteLine(nameof(WhenDoesItEnd));
void InnerLoop(int ix)
{
Console.WriteLine(ix++);
InnerLoop(ix);
}
InnerLoop(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment