1. 首页
  2. 数据库
  3. 其它
  4. c#Linq distinct不会调用Equals方法详解

c#Linq distinct不会调用Equals方法详解

上传者: 2021-02-27 12:09:15上传 PDF文件 58.93KB 热度 8次
我有以下课程 public class ModInfo : IEquatable { public int ID { get; set; } public string MD5 { get; set; } public bool Equals(ModInfo other) { return other.MD5.Equals(MD5); } public override int GetHashCode() { return MD5.GetHashCode(); } } 我使用如下方法将一些数据加载到该类的列表中: public void Relo
下载地址
用户评论