Difference between using Cast and AS operator in following code?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/132445/direct-casting-vs-as-operator">Direct casting vs &#39;as&#39; operator?</a>  </p>
</blockquote>



<p>Can any one tell the actual difference between snippet of code?</p>

<pre><code>var unknown = (object)new List&lt;string&gt;();

// Snippet 1: as operator
foreach (var item in unknown as IList&lt;int&gt;) {
 // Do something with item
}


// Snippet 2: cast operator
foreach (var item in (IList&lt;int&gt;)unknown) {
 // Do something with item
}
</code></pre>
