title: calling child class method from base class C#
body: <p>Is it possible to call child class method from base class reference? Please suggest...</p>
  
  <p>Code example is given below: </p>
  
  <pre><code>public class Parent
  {
      public string Property1 { get; set; }
  }
  
  public class Child1:Parent
  {
      public string Child1Property { get; set; }
  }
  public class Child2 : Parent
  {
      public string Child2Property { get; set; }
  }
  
  public class Program
  {
      public void callMe()
      {
          Parent p1 = new Child1();
          Parent p2 = new Child2();
  
          //here p1 &amp; p2 have access to only base class member.
          //Is it possible to call child class memeber from the base class reference based on the child class object it is referring to?
          //for example...is it possible to call as below:
          //p1.Child1Property = "hi";
          //p2.Child1Property = "hello";
      }
  }
  </code></pre>