123456789101112131415161718 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Ips.Library.Basic
- {
- public class HashCodeUtils
- {
- public static int CombineHashCodes(IEnumerable<object> objects)
- {
- unchecked
- {
- return objects.Aggregate(17, (current, obj) => current * 23 + (obj?.GetHashCode() ?? 0));
- }
- }
- }
- }
|