title: foreach(Derived obj in new List<Base>())
body: <p>What does the following code do?</p>
  
  <pre><code>class Base { }
  class Derived : Base { }
  class Test
  {
      void Foo(List&lt;Base&gt; list)
      {
          foreach (Derived obj in list)
          {
              // ...
          }
      }
  }
  </code></pre>
  
  <p>I didn't expect it to even compile, but it does.</p>