C# 14's 'params' for Collections: Say Goodbye to Arrays!

Ever used the params keyword in C#? If you write C# code regularly, you probably reach for it whenever you need to pass a variable number of arguments to a method. It’s super handy, letting you skip the tedious step of creating arrays first. But until now, there’s been a limitation: params only worked with arrays. This meant every call created memory allocations with potential performance costs. The good news? C# 14 is changing the game by extending params to work with modern collections like IEnumerable<T>, Span<T>, and more. ...

June 21, 2025 · 6 min · 1194 words

Understanding Delegates vs Events in C#: When and How to Use Each

Introduction to Delegates and Events If you’ve been coding in C# for a while, you’ve probably encountered delegates and events. These two features are incredibly powerful tools that help us write flexible, loosely coupled code. While they might seem similar at first glance (and yes, events are actually built on top of delegates), they each have their own purpose and best use cases. I remember when I first started learning C#, I found it challenging to understand exactly when to use delegates versus events. Over time, I’ve realized that choosing the right tool can make a huge difference in how maintainable and flexible your code becomes. ...

June 20, 2025 · 15 min · 2996 words