Yield! Reconsidering APIs with Collections
Explore how the yield keyword can reshape API design for returning collections in C#, comparing IEnumerable approaches from both caller and implementer angles.
C# language feature deep dives, including Roslyn analyzers, UnsafeAccessor, and techniques for making reflection-heavy code safe under Native AOT.
Showing 121–126 of 127 articles
Explore how the yield keyword can reshape API design for returning collections in C#, comparing IEnumerable approaches from both caller and implementer angles.
Understand how C# events can quietly cause memory leaks through instance scoped handlers, with downloadable source illustrating common event driven mistakes.
Learn a reusable C# pattern for starting and stopping single or grouped worker threads using AutoResetEvent signals, locks, and ownership checks.
Compares the Thread and BackgroundWorker classes in .NET, explaining when each fits and how BackgroundWorker builds on Thread with its DoWork event.
Walk through a C# example showing how an EventHandler can pass data back through EventArgs between an application layer and a presentation layer.
A follow-up exploring how C# events help decouple layered architecture, using an import example to show delegating decisions between components.