How can I make a variable inside a test for null available outside of the block?
<p>I have the following code:</p>

<pre><code>if (question.DetailsJSON != null) {
   var details = JSON.FromJSONString&lt;List&lt;Question.Detail&gt;&gt;(question.DetailsJSON);
}
</code></pre>

<p>This works but outside of the block the details is not available. </p>

<p>Without pre-declaring the details variable is there a way that I could do this if test and still have details available once outside of the if ?</p>
