fork download
  1. using System.IO;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5.  
  6. class Program
  7. {
  8. static void Main()
  9. {
  10. List<string> list1 = new List<string> { "A", "C", "F", "H", "I" };
  11. List<string> list2 = new List<string> { "B", "D", "F", "G", "L" };
  12. String sel = list1.Intersect(list2).FirstOrDefault()??"";
  13.  
  14. Console.WriteLine(sel);
  15.  
  16. }
  17. }
Success #stdin #stdout 0.03s 33944KB
stdin
Standard input is empty
stdout
F