© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•14mo ago•
63 replies
actual_weeb_tm

Boxing

Can someone help me understand boxing?

I'm struggling to understand why using IFoo<T> where T: struct, IFoo<T> would be an advantage over using T directly, but If I make an IFoo it gets boxed

Is there some way to prevent boxing while still using multiple types of IFoo<T>?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ Does this method cause boxing of value types?
C#CC# / help
4y ago
Avoiding boxing (causing many small allocations) in generic classes
C#CC# / help
2y ago
❔ Input into an int array
C#CC# / help
3y ago
Next page