© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
21 replies
nut

❔ template function cant convert despite constraint

hi, so im working on a basic ECS kind of thing for my game, and im trying to make a method that returns a list<T> given a T, where T is a component. for some reason, it cant convert T to component despite the constraint that T will always be a component
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

Cant convert HEX
C#CC# / help
4y ago
Phantom constraint
C#CC# / help
4y ago
cant convert type (int, int) to Vector2
C#CC# / help
2y ago
Tighter type constraint
C#CC# / help
12mo ago