/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(RecordSpecification obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return false; } if (this._numberOfRecordSets != obj._numberOfRecordSets) { ivarsEqual = false; } if (this._recordSets.Count != obj._recordSets.Count) { ivarsEqual = false; } if (ivarsEqual) { for (int idx = 0; idx < this._recordSets.Count; idx++) { if (!this._recordSets[idx].Equals(obj._recordSets[idx])) { ivarsEqual = false; } } } return ivarsEqual; }
/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(RecordSpecification obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return false; } if (this._numberOfRecordSets != obj._numberOfRecordSets) { ivarsEqual = false; } if (this._recordSets.Count != obj._recordSets.Count) { ivarsEqual = false; } if (ivarsEqual) { for (int idx = 0; idx < this._recordSets.Count; idx++) { if (!this._recordSets[idx].Equals(obj._recordSets[idx])) { ivarsEqual = false; } } } return ivarsEqual; }