title: C#: Custom casting to a value type
body: <p>Is it possible to cast a custom class to a value type?</p>
  
  <p>Here's an example:</p>
  
  <pre><code>var x = new Foo();
  var y = (int) x; //Does not compile 
  </code></pre>
  
  <p>Is it possible to make the above happen?  Do I need to overload something in <code>Foo</code> ?</p>