/// <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(MunitionDescriptor obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return(false); } if (!this._munitionType.Equals(obj._munitionType)) { ivarsEqual = false; } if (this._warhead != obj._warhead) { ivarsEqual = false; } if (this._fuse != obj._fuse) { ivarsEqual = false; } if (this._quantity != obj._quantity) { ivarsEqual = false; } if (this._rate != obj._rate) { 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(MunitionDescriptor obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return false; } if (!this._munitionType.Equals(obj._munitionType)) { ivarsEqual = false; } if (this._warhead != obj._warhead) { ivarsEqual = false; } if (this._fuse != obj._fuse) { ivarsEqual = false; } if (this._quantity != obj._quantity) { ivarsEqual = false; } if (this._rate != obj._rate) { ivarsEqual = false; } return ivarsEqual; }