有关IList 、List 使用Contains的问题
摘要:
引用类型想使用Contains,则必须Override 类的Equals方法以及GetHashCode public override bool Equals(object obj) { if (obj == null) return false; if (!obj.GetType().Equals(this.GetType())) return false; sas_user user = (sas_user)obj; return this.userid.Equals(user.userid); } public override int GetHashCode() { return th 阅读全文