BOOK THIS SPACE FOR AD
ARTICLE AD1. July 2021
This article has been indexed from DZone Security Zone
Do you like the ?. operator? Well, who doesn’t? Many people like these concise null checks. However, today’s article shows that the ?. operator may be tricky sometimes. That is, it can create an illusion of safety when used in the foreach loop.
Let’s start with a small task. Take a look at the following code: