using System.Collections.Generic;
public static void Main()
var identifiers = new [] {"one", "two", "three", "four", "five", "six", "seven"};
var hash1 = HashCode.Combine(identifiers[0], identifiers[1], identifiers[2], identifiers[3], identifiers[4], identifiers[5], identifiers[6]);
var hash2 = identifiers.Aggregate(new HashCode(), (h, s) => { h.Add(s); return h; }).ToHashCode();
Console.WriteLine("Result of using HashCode.Combine() for {0} strings: {1}", identifiers.Length, hash1);
Console.WriteLine("Result of using HashCode.Add() for {0} strings: {1}", identifiers.Length, hash2);
Assert.That(hash1 == hash2);