static void Main() { var derivedOne = new DerivedOne(); var derivedTwo = new DerivedTwo(); var one = derivedOne.Create(); var two = derivedTwo.Create(); }
static void Main(string[] args) { List <BaseEntity> list = new List <BaseEntity>(); DerivedOne d1 = new DerivedOne() { bp1 = 1, Name = "DerivedOne" }; DerivedTwo d2 = new DerivedTwo() { bp1 = 2, Name = "DerivedTwo" }; list.Add(d1); list.Add(d2); }