using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
List
oyears.Add(1990);
oyears.Add(1991);
oyears.Add(1992);
oyears.Add(1993);
oyears.Add(2001);
oyears.Add(2002);
oyears.Add(2003);
IEnumerable
foreach (int i in ienum)
{
Console.WriteLine(i);
}
Console.ReadKey();
}
}


VulpesRank #55 · 29.2K reputationPosted Nov 24, 2014, 4:02 AM EST
It therefore follows that List
Moreover, we can then assign the result to the variable, ienum, which is also of the IEnumerable
In fact, you could have done this without a cast since there's always an implicit conversion between a type and an interface which it implements. So this would also work just as well:
MahaRank #2,573 · 543 reputationPosted Nov 24, 2014, 4:10 AM EST