How to use LINQ to get the items that appear in one list but not the other in C#? - Biz Tech

How to use LINQ to get the items that appear in one list but not the other in C#?

Listen
 List<int> list1 = new List<int> { 1, 2, 3 };
List<int> list2 = new List<int> { 2, 3, 4 };
var uniqueNumbers = list1.Except(list2);

foreach (int number in uniqueNumbers)
{
    Console.WriteLine(number);
}