using System.Collections.Generic;
using System.Threading.Tasks;
using System.Collections;
public static void Main()
IList<int> intList = new List<int>() { 7, 10, 21, 30, 45, 50, 87 };
IList<string> strList = new List<string>() { "One", "Two", "Three", "Four", "Five" };
IList<string> emptyList = new List<string>();
Console.WriteLine("1st Element in intList: {0}", intList.First());
Console.WriteLine("1st Even Element in intList: {0}", intList.First(i => i % 2 == 0));
Console.WriteLine("1st Element in strList: {0}", strList.First());
Console.WriteLine("emptyList.First() throws an InvalidOperationException");
Console.WriteLine("-----------------------------------------------------");
Console.WriteLine(emptyList.First());