title: What's going on with this method overloading?
body: <p>I have a question about method overloading in C#.  I have a parent class and a child class.  </p>
  
  <pre><code>class Parent
  {
      public virtual string GetMyClassName()
      {
          return "I'm a Parent";
      }
  }
  
  class Child : Parent
  {
      public override string GetMyClassName()
      {
          return "I'm a Child";
      }
  }
  </code></pre>
  
  <p>I have two static methods declared outside of those two classes that act on objects of either type:</p>
  
  <pre><code>static string MyClassName(Parent parent)
  {
      return "That's a Parent";
  }
  
  static string MyClassName(Child child)
  {
      return "That's a Child";
  }
  </code></pre>
  
  <p>When I test out how these methods are all called, I get what I think is a strange result:</p>
  
  <pre><code>Parent p = new Child();
  var str1 = MyClassName(p); // = "That's a Parent"
  var str2 = p.GetMyClassName(); // = "I'm a Child"
  </code></pre>
  
  <p>Why does <code>str1</code> get set to "That's a Parent"?  I am probably misunderstanding method overloading in C#.  Is there a way to force the code use the Child call (setting str1 to "That's a Child")?</p>