Null-propagation replacement for null check prior conditional statement
After seeing a similar question , I was wondering if the following expression ... if (attribute != null && attribute.Description == input) ... would behave (almost) identical, to following null-propagation variant? if (attribute?.Description == input) So far, I could determine only following (somehow minor) differences: not possible in case input is of non-nullable type in case input would be itself null , behavior would be altered Am I missing something? or are there other differences in behavior ? EDIT: in the end, the only fail-safe alternative I've found for the first snippet, would be: if