null test versus try catch
<p>Does anyone have metrics on performing null test versus wrapping code in a try catch?</p>

<p>I suspect that the null test is much more efficient, but I don't have any empirical data.</p>

<p>The environment is C#/.net 3.x and the code comparison is:</p>

<pre><code>Dude x = (Dude)Session["xxxx"];
x = x== null ? new Dude(): x;
</code></pre>

<p>versus</p>

<pre><code>Dude x = null;
try {
    x = (Dude)Session["xxxx"];
    x.something();
} catch {
    x = new Dude();
}
</code></pre>

<p>are there any advantages to wrapping in try catch?</p>
