title: How to convert an ArrayList to a strongly typed generic list without using a foreach?
body: <p>See the code sample below.  I need the <code>ArrayList</code> to be a generic List.  I don't want to use <code>foreach</code>.</p>
  
  <pre><code>ArrayList arrayList = GetArrayListOfInts();  
  List&lt;int&gt; intList = new List&lt;int&gt;();  
  
  //Can this foreach be condensed into one line?  
  foreach (int number in arrayList)  
  {  
      intList.Add(number);  
  }  
  return intList;    
  </code></pre>