Geek Culture
Published in

Geek Culture

Null-Conditional Member Access Operators in C#

OMG, this is OOP on steroids!

Yup, from this point of view, C# is an OOP language on steroids!

Let’s have a look at this verbose snippet, the classic scenario of accessing members and sub-members of an object with the possibility of falling into a null somewhere:

--

--

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