0

Recently I have encountered "??" and "?." operators in C#. I wonder if someone could tell me how these two operators work and what are their main use cases and possible differences? Any guide or help appreciated in advance.

amirfg
  • 272
  • 2
  • 6
  • 21
  • 1
    '??' is called the "null coalescing operator". There are a lot of posts about it here on SO. I recommend just entering it into the search bar. There is a good post for it here: https://stackoverflow.com/questions/11960732/understanding-the-null-coalescing-operator – avariant Mar 27 '19 at 21:22

1 Answers1

2

?? null-coalescing operator

?. and ?[] null-conditional operators

Johnny
  • 8,939
  • 2
  • 28
  • 33