It’s the Null-Conditional Operator
It’s a syntactic sugar for null checking:
return str?.ToString();
will become
if (str == null)
{
return null;
}
return str.ToString();
It’s the Null-Conditional Operator
It’s a syntactic sugar for null checking:
return str?.ToString();
will become
if (str == null)
{
return null;
}
return str.ToString();