Although C# 8 is released for a while, I’m still discovering new features.
When I want to conditionally assign a value to a variable whether it is null or not, I typically used either the conditional ternary operator:
or a coalesce expression:
With C# 8, you can even write this shorter with the null coalescing operator: