0

I am reading this article and it has this example

int? length = people?.Length; // null if people is null

My question is if the first question mark after the int a typo ? If not what is the purpose of introducing a ? after an int. I understand why its introduced after people. The reason for that is if people is null then it will return a null. Can someone explain the purpose of the ?

MistyD
  • 16,373
  • 40
  • 138
  • 240

0 Answers0