chinmay.sahoo
New member
Conversion operators convert the type of input objects into a specific type or sequence. The aggregate operators are AsEnumerable, Cast, ToList, ToArray and ToDictionary.
List<int> data = new List<int> { 10, 20, 30, 40, 50 }; //Cast to Array int[] strArray = data.Cast<int>().ToArray(); //result:10 20 30 40 50 for (int i = 0; i < strArray.Length; i++) { Console.Write(strArray + " "); }