title: C# - when to call base.OnSomething?
body: <p>I'm using <code>Windows.Forms</code> and have to inherit some controls to provide custom behavior. This inheritance obviously leads to method overriding.</p>
  
  <p><em>So, here is the question</em> - in which cases the order of calling <code>base.OnSomething(...)</code> can really affect the visible behavior of your program?</p>
  
  <pre><code>protected override OnRetrieveVirtualItem(RetrieveVirtualItemEventArgs e)
  {
      // base.OnRetrieveVirtualItem(e); - Could this potentially break something?
  
      // Perform your custom method.
      // ...
  
      base.OnRetrieveVirtualItem(e); // Is this always "correct"?
  }
  </code></pre>
  
  <p>As far as I know for know, this order can be important when overriding paint-related methods (<code>OnDrawItem, ...</code>), but I guess there <em>are some other ways to shoot yourself in the leg,</em> because <code>Windows.Forms</code> does a lot of unmanaged code calls with possible side effects.</p>
  
  <p><strong>So, when could it possibly matter?</strong> And what are the rules of thumb about choosing the correct place to call the <code>base</code> method in these cases?</p>