I am trying to implement (C#) an interface method in a class, returning a derived type instead of the base type as defined in the interface:
interface IFacto
Use Generics
interface IFactory where T: BaseCar { T GetCar(); } class MyFactory : IFactory { MyCar GetCar() { } } class MyCar : BaseCar { }