Using the Cast operator with IEnumerable

System.Collections.ArrayList people = new System.Collections.ArrayList();
people.Add("Mani");
people.Add("Madhu");
IEnumerable<string> query = people.Cast<string>().Select(people => people);
foreach (string people in query)
Console.WriteLine(people);

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.