/** * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful. */ public bool equals(DataQueryReliablePdu rhs) { bool ivarsEqual = true; if (rhs.GetType() != this.GetType()) { return(false); } if (!(_requiredReliabilityService == rhs._requiredReliabilityService)) { ivarsEqual = false; } if (!(_pad1 == rhs._pad1)) { ivarsEqual = false; } if (!(_pad2 == rhs._pad2)) { ivarsEqual = false; } if (!(_requestID == rhs._requestID)) { ivarsEqual = false; } if (!(_timeInterval == rhs._timeInterval)) { ivarsEqual = false; } if (!(_numberOfFixedDatumRecords == rhs._numberOfFixedDatumRecords)) { ivarsEqual = false; } if (!(_numberOfVariableDatumRecords == rhs._numberOfVariableDatumRecords)) { ivarsEqual = false; } for (int idx = 0; idx < _fixedDatumRecords.Count; idx++) { FixedDatum x = (FixedDatum)_fixedDatumRecords[idx]; if (!(_fixedDatumRecords[idx].Equals(rhs._fixedDatumRecords[idx]))) { ivarsEqual = false; } } for (int idx = 0; idx < _variableDatumRecords.Count; idx++) { VariableDatum x = (VariableDatum)_variableDatumRecords[idx]; if (!(_variableDatumRecords[idx].Equals(rhs._variableDatumRecords[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(DataQueryReliablePdu rhs) { bool ivarsEqual = true; if(rhs.GetType() != this.GetType()) return false; if( ! (_requiredReliabilityService == rhs._requiredReliabilityService)) ivarsEqual = false; if( ! (_pad1 == rhs._pad1)) ivarsEqual = false; if( ! (_pad2 == rhs._pad2)) ivarsEqual = false; if( ! (_requestID == rhs._requestID)) ivarsEqual = false; if( ! (_timeInterval == rhs._timeInterval)) ivarsEqual = false; if( ! (_numberOfFixedDatumRecords == rhs._numberOfFixedDatumRecords)) ivarsEqual = false; if( ! (_numberOfVariableDatumRecords == rhs._numberOfVariableDatumRecords)) ivarsEqual = false; for(int idx = 0; idx < _fixedDatumRecords.Count; idx++) { FixedDatum x = (FixedDatum)_fixedDatumRecords[idx]; if( ! ( _fixedDatumRecords[idx].Equals(rhs._fixedDatumRecords[idx]))) ivarsEqual = false; } for(int idx = 0; idx < _variableDatumRecords.Count; idx++) { VariableDatum x = (VariableDatum)_variableDatumRecords[idx]; if( ! ( _variableDatumRecords[idx].Equals(rhs._variableDatumRecords[idx]))) ivarsEqual = false; } return ivarsEqual; }