private static void Main(string[] args) { IMyList a = new ListA { new ClassA { ClassAFoo = "I'm an A" } }; IMyList b = new ListB { new ClassB { ClassBFoo = "I'm a B" } }; a.CommonOperation(); b.CommonOperation(); }
private static void Main(string[] args) { IMyList a = new ListA { new ClassA { ClassAFoo = "I'm an A" } }; IMyList b = new ListB { new ClassB { ClassBFoo = "I'm a B" } }; a.CommonOperation(); b.CommonOperation(); }