title: C# Nullable Types and the Value property
body: <p>I'm a little unclear on when/if the <code>Value</code> property on nullable types must be used when getting the value contained in a nullable type. Consider the following example:</p>
  
  <pre><code>int? x = 10;
  
  Console.WriteLine("The value of 'x' is " + x.Value);
  Console.WriteLine("The value of 'x' is " + x);
  </code></pre>
  
  <p>Both of these return the same value (10).</p>
  
  <p>However, if I initially set <code>x</code> to <code>null</code>, the first <code>Console.WriteLine</code> throws an exception and the second one does not.</p>
  
  <p>So, my question is this. What is the point of using the <code>Value</code> property? It doesn't appear to be needed to get the actual value (even if it's <code>null</code>) and will throw an exception if the value is indeed <code>null</code>.</p>