title: Difference between type cast and 'as' cast
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr">Casting vs using the ‘as’ keyword in the CLR</a>  </p>
  </blockquote>
  
  
  
  <p>I know there are a lot of questions about casts but I don't know the specific names of these two casts so I'm not sure where to look. What are the differences between the two casts below?</p>
  
  <pre><code>TreeNode treeNode = (TreeNode)sender; // first cast
  TreeNode treeNode = (sender as TreeNode); //second cast
  </code></pre>