title: Method overriding in C#
body: <p>This is a rather simple question, I have a base class which implements common GUI elements, and a series of child classes which I want to override a given method, so they can implement their own behavior on a common control (namely, Prev and Next buttons).</p>
  
  <p>So I have this</p>
  
  <pre><code>public class MetalGUI : BaseGUI {
      new protected void OnGUI()
      {
          base.OnGUI();
          if(GUI.Button(prevRect, "BACK", "ButtonLeft"))
              OnPrev();
  
          if(GUI.Button(nextRect, "NEXT", "ButtonRight"))
              OnNext();
  
      }
  
      virtual protected void OnPrev(){}
      virtual protected void OnNext(){}
  }
  </code></pre>
  
  <p>and this is one of the child classes</p>
  
  <pre><code>public class MissionSelectGUI : MetalGUI {
      new void OnGUI()
      {
          base.OnGUI();
      }
  
      new protected void OnPrev()
      {
          Application.LoadLevel("mainMenu");
      }
      new protected void OnNext()
      {
          Application.LoadLevel("selectPlayer");
      }
  }
  </code></pre>
  
  <p>(both classes have been stripped off the stuff non-essential for this case)</p>
  
  <p>The thing is that when I have a member of <code>MissionSelectGUI</code> instantiated, the <code>OnPrev</code> and <code>OnNext</code> on <code>MetalGUI</code> is getting called instead of the overriden methods. Why is this?</p>