title: C# Overloaded method invocation with Inheritance
body: <p>I wonder what is the reason for the invocation of the method that prints "double in derived". I didn't find any clue for it in the C# specification.</p>
  
  <pre><code>public class A
  {
      public virtual void Print(int x)
      {
          Console.WriteLine("int in base");
      }
  }
  
  public class B : A
  {
      public override void Print(int x)
      {
          Console.WriteLine("int in derived");
      }
      public void Print(double x)
      {
          Console.WriteLine("double in derived");
      }
  }
  
  
  
  B bb = new B();
  bb.Print(2);
  </code></pre>