title: Start and finish lock in different methods
body: <p>I would like to - for obscure reasons thou shall not question - start a lock in a method, and end it in another. Somehow like:</p>
  
  <pre><code>object mutex = new object();
  
  void Main(string[] args)
  {
      lock (mutex)
      {
          doThings();
      }
  }
  </code></pre>
  
  <p>Would have the same behaviour as:</p>
  
  <pre><code>object mutex = new object();
  
  void Main(string[] args)
  {
      Foo();
      doThings();
      Bar();
  }
  
  void Foo()
  {
      startLock(mutex);
  }
  
  void Bar()
  {
      endlock(mutex);
  }
  </code></pre>
  
  <p>The problem is that the lock keyword works in a block syntax, of course. I'm aware that locks are not meant to be used like this, but I'm more than open to the creative and hacky solutions of S/O. :)</p>