← Back
Nick Chapsas April 10, 2025 40s

The "in" keyword in C# is Awesome

Summary

The transcript discusses the 'in' keyword in C# and its performance optimization benefits for passing structs by reference while ensuring they remain read-only within methods. Key concepts include avoiding expensive struct copying, using 'in' as a safer alternative to 'ref', and potential performance impacts when structs are not marked readonly. The practical takeaway is to combine 'in' with readonly structs or readonly members to achieve the most significant performance improvements when working with method parameters.

View original episode ↗