title: Calling child class method from parent
body: <p>Is it possible for the a.doStuff() method to print "B did stuff" without editing the A class? If so, how would I do that? </p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          A a = new A();
          B b = new B();
  
          a.doStuff();
          b.doStuff();
  
          Console.ReadLine();
      }
  }
  
  class A
  {
      public void doStuff()
      {
          Console.WriteLine("A did stuff");
      }
  }
  
  class B : A
  {
      public void doStuff()
      {
          Console.WriteLine("B did stuff");
      }
  }
  </code></pre>
  
  <p>I'm modding a steam game, Terraria. And I don't want to decompile and recompile it all because that will screw with steam. My program 'injects' into Terraria via XNA. I can use the update() and draw() methods from XNA to mod some things. But it's pretty limited. I wan't to override base methods to mod more things (worldgen for example).</p>