Is there some way to solve my code below? I'm kinda stuck.
How can I use a factory to create generic presenters, is it even possible without a non generic base class?
public abstract class Presenter<T>
{}
public SomePresenter : Presenter<ISomeVew>
{}
public SomeOtherPresenter : Presenter<ISomeOtherView>
{}
public class Factory()
{
public ??? CreatePresneter(int runTimeValue)
{
if (runTimeValue == 1)
return new SomePresenter()
else
return new SomeOtherPresenter()
}
}