This commit is contained in:
2020-04-30 15:57:43 +00:00
parent 659e1e8f55
commit 451bbc1fd0

View File

@@ -366,6 +366,17 @@ namespace AyaNova.PlugIn.V8
}
public static int GetOrderIndependentHashCode<T>(IEnumerable<T> source)
{
int hash = 0;
foreach (T element in source)
{
hash = unchecked(hash +
EqualityComparer<T>.Default.GetHashCode(element));
}
return hash;
}
#endregion
}//eoc