using System.Collections.Generic;
public static void Main()
var guid1 = Guid.NewGuid();
var guid2 = Guid.NewGuid();
var seriesIds1 = new List<Guid> { guid1, guid2 };
var seriesIds2 = new List<Guid> { guid1, guid2 };
var seriesIds3 = new List<Guid> { guid2, guid1 };
Console.WriteLine(CurrentApproach(seriesIds1));
Console.WriteLine(CurrentApproach(seriesIds2));
Console.WriteLine(CurrentApproach(seriesIds3));
Console.WriteLine(HashSetHashCode(seriesIds1));
Console.WriteLine(HashSetHashCode(seriesIds2));
Console.WriteLine(HashSetHashCode(seriesIds3));
public static int CurrentApproach(List<Guid> seriesIds)
var seriesIdsHash = seriesIds.Distinct()
.Select(item => item.GetHashCode())
.Aggregate((total, nextCode) => total ^ nextCode);
public static int HashSetHashCode(List<Guid> seriesIds)
var seriesIdsHash = new HashSet<Guid>(seriesIds).GetHashCode();