class program { static void main(string[] args) { List<int> oyears=new List<int>(); oyears.Add(100); oyears.Add(101); oyears.Add(102); } IEnumerable<int> enum=(IEnumerable<int>) oyears; foreach(int i in enum) { console.wriline(i); }
IEnumerable<T>
IEnumerable
T
<T>
IEnumerable<t> is an interface - you can't create an IEnumerable<t>, but rather must create some class that implements IEnumerable<t></t></t></t>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)