fork 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. var oldList = new List<int>() { 1, 2, 3, 4, 5 };
  10. var newList = new List<int>() { 1, 2, 3, 6, 7 };
  11.  
  12. var value = oldList.Except(newList);
  13.  
  14. foreach (var i in value)
  15. {
  16. Console.WriteLine(i);
  17. }
  18. }
  19. }
Success #stdin #stdout 0.04s 34040KB
stdin
Standard input is empty
stdout
4
5