title: cast the Parent object to Child object in C#
body: <p>Hi i want to cast the Parent object to Child object in C#</p>
  
  <pre><code>public class Parent
  {
      public string FirstName {get; set;}
      public string LastName {get; set;}
      public string City {get; set;}
  }
  
  public class Child : Parent
  {
      public string PhoneNumber {get; set;}
      public string MobileNumber {get; set;}
  }
  </code></pre>
  
  <p>now the scenario is is a list of parent object and i want to generate list of child object so that i can have extended information </p>
  
  <pre><code>List&lt;Parent&gt; lstParent;
  List&lt;Child&gt; lstChild = new List&lt;Child&gt;();
  
  foreach(var obj in lstParent)
  {
      lstChild.add((Child)obj);
  }
  </code></pre>
  
  <p>as child class inherited parent class so the child class already have the parent class member i just want to fill them automatically so that i can populate datamember of child class </p>