© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
5 replies
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SendKeys Isn't Working Properly
C#CC# / help
4y ago
✅ My bot isn't working
C#CC# / help
3y ago