SelectMany Prototype : SelectMany « LINQ « C# / C Sharp






SelectMany Prototype

 

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
    public static void Main() {
        string[] presidents = {"Ad", "Art", "Buch", "Bush", "Car", "land"};

        IEnumerable<char> chars = presidents.SelectMany(p => p.ToArray());

        foreach (char ch in chars)
            Console.WriteLine(ch);

    }
}

 








Related examples in the same category

1.A More Complex Example of the First SelectMany
2.SelectMany Prototype: with ? operator