title: C# difference between casting and as?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/702234/what-is-the-difference-between-the-following-casts-in-c">What is the difference between the following casts in c#?</a>  </p>
  </blockquote>
  
  <p>In C#, is a there difference between casting an object or using the <code>as</code> keyword? Hopefully this code will illustrate what I mean...</p>
  
  <pre><code>String text = "Hello hello";
  Object obj = text; 
  
  String originalCast = ((String)obj).ToUpper();
  String originalAs = (obj as String).ToUpper();
  </code></pre>
  
  <p>Thanks</p>
  
  <p><strong>:)</strong></p>