title: Cause a stack overflow with a while loop
body: <p>I'm trying to look into what causes exceptions to occur</p>
  
  <pre><code>Console.WriteLine("Please enter your name.");
  string playerName = Console.ReadLine();
                  while (playerName.Length == 0)
                  {
                      Console.WriteLine("Don't be a ****, enter a name!");
                  }
  </code></pre>
  
  <p>This code compiles without causing a Stack Overflow exception.</p>
  
  <p>I did something similar in a lecture which caused a stack overflow exception but this code does not. This means it cannot be adding to the stack. How would I write this code in such a way that it causes a stack overflow exception?</p>