ArrayList and IEnumerable query
<p>Why does the following DisplayContents not work(wont compile) for an ArrayList as it inherits form IEnumerable)</p>

<pre><code>public class Program
    {
        static void Main(string[] args)
        {
            List&lt;int&gt; l = new List&lt;int&gt;(){1,2,3};
            DisplayContents(l);

            string[] l2 = new string[] {"ss", "ee"};
            DisplayContents(l2);

            ArrayList l3 = new ArrayList() { "ss", "ee" };
            DisplayContents &lt; ArrayList&gt;(l3);

            Console.ReadLine();
        }

        public static void DisplayContents&lt;T&gt;(IEnumerable&lt;T&gt; collection)
        {
            foreach (var _item in collection)
            {
                Console.WriteLine(_item);
            }
        }
    }
</code></pre>
