List<int> MyList = new List<int>();
MyList.Add(1);
MyList.Add(2);
MyList.Add(3);
MyList.Add(4);
foreach(int item in MyList){
System.Console.WriteLine(MyList);
}
This is what my code shows :
System.Collections.Generic.List`1[System.Int32]
System.Collections.Generic.List`1[System.Int32]
System.Collections.Generic.List`1[System.Int32]
System.Collections.Generic.List`1[System.Int32]