title: When to use Cast() and Oftype() in Linq
body: <p>I am aware of two methods of casting types to <code>IEnumerable</code> from an <code>Arraylist</code> in Linq and wondering in which cases to use them?</p>
  
  <p>e.g</p>
  
  <pre><code>IEnumerable&lt;string&gt; someCollection = arrayList.OfType&lt;string&gt;()
  </code></pre>
  
  <p>or</p>
  
  <pre><code>IEnumerable&lt;string&gt; someCollection = arrayList.Cast&lt;string&gt;()
  </code></pre>
  
  <p>What is the difference between these two methods and where should I apply each case?</p>