Beware of These Iterator and Collection Traps
Explore common C# pitfalls when choosing between iterators and materialized collections, covering memory use, re-enumeration risks, and safer API design.
C# and .NET by Nick Cosentino
Practical, in-depth content for software engineers and technical leaders. Learn C#, .NET, software architecture, AI-assisted development, and engineering leadership with guidance you can apply on your team today.

The latest articles on software engineering, architecture, AI, and career growth.
Explore common C# pitfalls when choosing between iterators and materialized collections, covering memory use, re-enumeration risks, and safer API design.
If you're writing asynchronous code in C# and using EventHandlers, odds are you've had issues with exceptions. Task EventHandlers might be consideration!
I turn a Meal Coach design discussion into concrete backend work, while figuring out how to balance side-project development with regular content creation.
Async event handlers in C# are tricky: an async void event handler can swallow exceptions and crash your app. Use this simple safety-net pattern to handle them.
Go deeper into the core topics on Dev Leader, from .NET and AI to software engineering and career growth.