/** * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful. */ public bool equals(GridAxisRecordRepresentation2 rhs) { bool ivarsEqual = true; if (rhs.GetType() != this.GetType()) { return(false); } if (!(_numberOfValues == rhs._numberOfValues)) { ivarsEqual = false; } for (int idx = 0; idx < _dataValues.Count; idx++) { FourByteChunk x = (FourByteChunk)_dataValues[idx]; if (!(_dataValues[idx].Equals(rhs._dataValues[idx]))) { ivarsEqual = false; } } return(ivarsEqual); }
/** * Compares for reference equality and value equality. */ public bool equals(GridAxisRecordRepresentation2 rhs) { bool ivarsEqual = true; if(rhs.GetType() != this.GetType()) return false; ivarsEqual = base.Equals(rhs); if( ! (_numberOfValues == rhs._numberOfValues)) ivarsEqual = false; if( ! (_dataValues.Count == rhs._dataValues.Count)) ivarsEqual = false; if(ivarsEqual) { for(int idx = 0; idx < _dataValues.Count; idx++) { if( ! ( _dataValues[idx].Equals(rhs._dataValues[idx]))) ivarsEqual = false; } } return ivarsEqual; }
/** * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful. */ public bool equals(GridAxisRecordRepresentation2 rhs) { bool ivarsEqual = true; if(rhs.GetType() != this.GetType()) return false; if( ! (_numberOfValues == rhs._numberOfValues)) ivarsEqual = false; for(int idx = 0; idx < _dataValues.Count; idx++) { FourByteChunk x = (FourByteChunk)_dataValues[idx]; if( ! ( _dataValues[idx].Equals(rhs._dataValues[idx]))) ivarsEqual = false; } return ivarsEqual; }