The Null-Conditional Index

suggest change

Similarly to the ?. operator, the null-conditional index operator checks for null values when indexing into a collection that may be null.

string item = collection?[index];

is syntactic sugar for

string item = null;
if(collection != null)
    item = collection[index];

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents