ERROR IN Generic Collections
-
-----------------------Program on Generic Collections---------------------------------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CollectionsGENERIC { class Program { static void Main(string[] args) { List numbers = new List(); numbers.Add(1); numbers.Add(2); numbers.Add(3); foreach (int x in numbers) { Console.WriteLine("{0}", numbers); } Console.WriteLine(".............."); List str = new List(); str.Add("a"); str.Add("b"); str.Add("c"); foreach (string y in str) { Console.WriteLine(str); } Console.ReadLine(); } } } ---------------------------------------------------------------------- When i executed above Program i am getting below Error ---------------------------------------------------------------------- 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.String] System.Collections.Generic.List`1[System.String] System.Collections.Generic.List`1[System.String] --------------------------------------------------------------------------- Could anyone Tell me where i did mistake?