title: Why is "lock (typeof (MyType))" a problem?
body: <p>MSDN gives the following warning about the <strong>lock</strong> keyword in C#:  </p>
  
  <blockquote>
    <p>In general, avoid locking on a public
    type, or instances beyond your code's
    control. The common constructs lock
    (this), lock (typeof (MyType)), and
    lock ("myLock") violate this
    guideline:</p>
  
  <pre><code>* lock (this) is a problem if the instance can be accessed publicly.
  * lock (typeof (MyType)) is a problem if MyType is publicly accessible.
  </code></pre>
  </blockquote>
  
  <p>Yet it gives no solid reasoning for it. The lock(this) is explained <a href="https://stackoverflow.com/questions/251391/why-is-lockthis-bad">here on SO</a>. I'm interested in lock(typeof(MyType)) case. What is dangerous about it?</p>
  
  <p>Thank you.</p>