static void Main(string[] args) { IBikeFactory factory = new SamFactory(); Body body = factory.CreateBody(); Wheel wheel = factory.CreateWheel(); Console.WriteLine(body.GetType()); Console.WriteLine(wheel.GetType()); factory = new GtFactory(); body = factory.CreateBody(); wheel = factory.CreateWheel(); Console.WriteLine(body.GetType()); Console.WriteLine(wheel.GetType()); }