I need help understanding the difference between null coalescing and null coalescing+conditional

I’m studying on a book, so I’ll just write the code here. I’m sorry but I can’t use the code format here on Reddit.int len = str?.Lenght ?? 0;Why would I write this? What’s the point in the null conditional in str.Lenght? Isn’t null coalescing (??) automatically checking if string is null? I’m sorry if the question isn’t clear via /r/learncsharp https://ift.tt/3aKAbA4
Categories: Uncategorized