Hi Steve!

Thanks for taking the time to read my article. It’s much appreciated!

The collection initialization syntax uses the Add() method behind the scenes. So, if you pass in null, it’ll just return and exit the method.

I did do unit tests before putting this up :)

Sure, extension methods are definitely a way to go. They do however serve a different purpose than the one I’m describing here.

Software Developer Manager | Big4 ex. FinTech | Writer with +1M views. Sharing my opinion & what I learn. YT channel youtube.com/c/NicklasMillard

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store