title: Extend a method in the base class c#
body: <p>how do i extend a behaviour from the base class like this? </p>
  
  <pre><code>public class A  {
      protected virtual void foo () {
          Console.WriteLine("hi")
      }
  }
  
  public class B : A  {
      protected override void foo () {
          Console.WriteLine("hihi")
      }
  }
  
  a = new A();
  a.foo() 
  
  -&gt; "hi"
  -&gt; "hihi"
  </code></pre>
  
  <p>When calling foo in the parent class i want to execute a behavior specific for that class while at the same time calling it in the child. Is it possible to do this with just accessing the parent?</p>