An expression that's equivalent to the return keyword
<pre><code>void Foo()
{
    var xMaybeNull = GetX();
    if (xMabyeNull == null) return; // Some way to get rid of this extra
                                    // sentence without loosing the check
    // do stuff
}
</code></pre>

<p>The easy way would be this, but the compiler expects an expression.</p>

<pre><code>void Foo()
{
    List&lt;Disc[,]&gt; xNeverNull = GetX() ?? return;
    // do stuff
}
</code></pre>

<p>The question is, is there any way to write the <code>someSortOfReturnExpression</code> (I guess not) or another solution, that can do what I'm looking for on one line?</p>

<pre><code>void Foo()
{
    List&lt;Disc[,]&gt; xNeverNull = GetX() ?? someSortOfReturnExpression;
    // do stuff
}
</code></pre>
