/// <summary> /// Compares <paramref name="obj"/> to this instance. /// </summary> /// <param name="obj"><see langword="object"/> to compare.</param> /// <returns>True if equal, false if not.</returns> public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } InterLinqMethodBase other = (InterLinqMethodBase)obj; if (ParameterTypes.Count != other.ParameterTypes.Count) { return(false); } return(!ParameterTypes.Where((t, i) => !t.Equals(other.ParameterTypes[i])).Any() && base.Equals(obj)); }
/// <summary> /// Compares <paramref name="obj"/> to this instance. /// </summary> /// <param name="obj"><see langword="object"/> to compare.</param> /// <returns>True if equal, false if not.</returns> public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } InterLinqMethodBase other = (InterLinqMethodBase)obj; if (ParameterTypes.Count != other.ParameterTypes.Count) { return(false); } for (int i = 0; i < ParameterTypes.Count; i++) { if (!ParameterTypes[i].Equals(other.ParameterTypes[i])) { return(false); } } return(base.Equals(obj)); }