Hi i want to cast the Parent object to Child object in C#
public class Parent { public string FirstName {get; set;} public string LastName {get; set;
var lstChild = lstParent.Cast().ToList();
or
var lstChild = lstParent.ConvertAll(x=>(Child)x);
Both of these, however, assume that the Parent list actually contains Child instances. You can't change the actual type of an object.
Parent
Child