linq group by / distinct

https://www.cnblogs.com/qixu/p/6033532.html

http://www.cnblogs.com/A_ming/archive/2013/05/24/3097062.html

https://docs.microsoft.com/zh-cn/dotnet/api/system.linq.enumerable.distinct?view=netframework-4.8

使用IEqualityComparer需要注意的是,如果成员变量中包含byte[]类型,计算哈希值,不可直接通过GetHashCode获取,而应转为字符串后,再计算

//这样会使排序失效:
int hash = byteAry == null ? 0 : byteAry .GetHashCode();

//使用这种方法:
int hash = BitConverter.ToString(byteAry ).Replace("-", "").GetHashCode();
原文地址:https://www.cnblogs.com/wswind/p/10739818.html