title: C#. Can I automatically substitute derived class instead of base class
body: <p>Language is C#.<br>
  Say i have overridden method in class A</p>
  
  <pre><code>    class A:B
      {
          protected override void Method(BaseClass bc)
          {
              (DerivedClass)bc.DerivedClassField = blabla;
          }
      }
  </code></pre>
  
  <p>Is there any library/language feature/etc using which i can write following:</p>
  
  <pre><code>    class A:B
      {
          protected override void Method(BaseClass bc)
          {
              bc.DerivedClassField = blabla;
          }
      }
  </code></pre>
  
  <p>by, for instance, adding some attribute to class A or something?<br>
  Sorry for crappy formatting.</p>