/// <summary> /// Returns a value indicating whether this instance and a specified Polynomial object represent the same value. /// </summary> /// <param name="value">An object to compare to this instance.</param> /// <returns>true if value is equal to this instance; otherwise, false.</returns> public bool Equals(Polynomial value) { if (ReferenceEquals(value, null)) { return(false); } if (ReferenceEquals(this, value)) { return(true); } return(Coefficients.SequenceEqual(value.Coefficients)); }
public override bool Equals(object obj) { return(obj is FpExtensionBase <T> other?Coefficients.SequenceEqual(other.Coefficients) : false); }