摘要:善用 IEnumerable
	因為 array 與 List<T> 都有實作 IEnumerable 介面,
	將方法的引數宣告為 IEnumerable 便可通吃 array 與 List<T>,
	如下:
private void ListAllElement(IEnumerable elements)
{
    foreach (int element in elements)
    {
        Console.WriteLine(element);
    }
} 
int[] a = { 1, 2, 3 };
List b = new List { 4, 5, 6 };
ListAllElement(a);
ListAllElement(b);
  當然啦, 不只 List<T>, 只要是有實作 IEnumerable 介面的型別都適用。