title: Char to int conversion to get ASCII
body: <p>This may be an immature question, may be am missing something but my question is</p>
  
  <p>Trying convert a <code>char</code> to <code>int</code> to get the <em>ASCII</em> value of that <code>char</code>, in most cases I get correct/expected <em>ASCII</em> code for particular <code>char</code>, in some cases I don't. Can someone explain me why? </p>
  
  <p>Examples:</p>
  
  <pre><code>// Example 1:-   
  
  Console.WriteLine((int)'a');
  
  // gives me 97 perfect!
  
  // Example 2:-
  
  Console.WriteLine((char)1); gives me ☺
  
  // now 
  
  Console.WriteLine((int )'☺');
  
  // this should give me 1, instead it gives me 9786 why?
  </code></pre>
  
  <p>this happens to ASCII > <code>127</code> or ASCII &lt; <code>32</code>.</p>