title: In c# Parent class object initialized by child class instance
body: <p>I have seen many examples on the concepts of inheritance, abstraction and polymorphism where an object of a base class is being initialized by a child class like below:</p>
  
  <pre><code>BaseClass obj1 = new ChildClass();
  </code></pre>
  
  <p>Most of the examples only used unreal and simple examples, but I always wanted to know the real life examples on what scenarios these can be used.</p>