C#C
C#2y ago
Althos

Why isn't my generic working properly ?

I created a method that takes a T which implements IGameEvent, then create an EventExecution<T> object that should be of the same type, so if my IGameEvent is of type PlayCardEvent, I expect to get an EventExecution<PlayCardEvent> in return, but I'm just getting an EventExecution<IGameEvent> object, why is that ?
image.png
Was this page helpful?