title: Using lock(obj) inside a recursive call
body: <p>As per my understanding a lock is not released until the runtime completes the code block of the lock(obj) ( because when the block completes it calls Monitor.Exit(obj).</p>
  
  <p>With this understanding i am not able to understand the reason behind the behaviour of the following <strong>code :</strong></p>
  
  <pre><code>private static string obj = "";
          private static void RecurseSome(int number)
          {
              Console.WriteLine(number);
              lock (obj)
              {
                  RecurseSome(++number);
              }
          }
  </code></pre>
  
  <p>//<strong>Call:</strong> <code>RecurseSome(0)</code></p>
  
  <p>//<strong>Output:</strong> <code>0 1 2 3...... stack overflow exception</code></p>
  
  <p>There must be some concept that i am missing. Please help.</p>