I would like to program a helper method in a Unit test project that initializes the presenter, sets up an instance of the views for it, and sets the state of the presenter.
This excluded me:
type parameter cannot be used with type arguments
the code:
public static **TPresenter<TView>** Initialize<TPresenter,TView>() where TPresenter: BasePresenter<TView>, new() where TView : new() { }
After a couple of minutes, I found that the problem was with my return type TPresenter<Tview>
I read a few posts that clearly didn't explain why I can't say T1<T2>
I was forced to make the assignment of the leader through the reference parameter. Any explanation is appreciated!
source share