fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. List<string> A_list = new List<string>() { "one", "two", "three" };
  10. List<string> B_list = new List<string>() { "two", "three", "four" };
  11. var newlist = A_list.Intersect(B_list);
  12.  
  13. foreach (var i in newlist)
  14. Console.WriteLine(i);
  15. }
  16. }
Success #stdin #stdout 0.03s 33928KB
stdin
Standard input is empty
stdout
two
three