← Back
Nick Chapsas September 17, 2024 12m

Stop Using FirstOrDefault in .NET! | Code Cop #021

Summary

This analysis debunks questionable tech advice, specifically regarding the use of `List.Find` versus `List.FirstOrDefault`. It highlights that while `Find` is generally more performant and memory-efficient than `FirstOrDefault` for matching items, blindly following such advice without understanding context can lead to poorer code. The takeaway is to critically evaluate advice and understand the underlying mechanics rather than simply accepting surface-level recommendations.

View original episode ↗