Query with an Exception
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);
}
}
Related examples in the same category