public class Person : EntityObject{ ...}OjbectSet<Person> osp;......想要达到这样的目的:ObjectSet<EntityObject> ose = osp;
class Program { static void Main(string[] args) { List<childclass> lstChild = new List<childclass>(); List<parentclass> lstChild2 = lstChild.Cast<parentclass>().ToList(); } } public class parentclass { } public class childclass : parentclass { }