Query with an Exception

image_pdfimage_print
   
 


using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
    public static void Main() {
        string[] presidents = {"AAAA", "aaaa", "bacDert", "B1234", "Carter"};

        IEnumerable<string> items = presidents.Where(s => Char.IsLower(s[4]));

        Console.WriteLine("After the query.");

        foreach (string item in items)
            Console.WriteLine(item);

    }
}

    


This entry was posted in LINQ. Bookmark the permalink.