/** * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful. */ public bool equals(BurstDescriptor rhs) { bool ivarsEqual = true; if (rhs.GetType() != this.GetType()) { return(false); } if (!(_munition.Equals(rhs._munition))) { ivarsEqual = false; } if (!(_warhead == rhs._warhead)) { ivarsEqual = false; } if (!(_fuse == rhs._fuse)) { ivarsEqual = false; } if (!(_quantity == rhs._quantity)) { ivarsEqual = false; } if (!(_rate == rhs._rate)) { ivarsEqual = false; } return(ivarsEqual); }
///<summary> ///Describes munition used ///</summary> public void setBurstDescriptor(BurstDescriptor pBurstDescriptor) { _burstDescriptor = pBurstDescriptor; }
/** * Compares for reference equality and value equality. */ public bool equals(BurstDescriptor rhs) { bool ivarsEqual = true; if(rhs.GetType() != this.GetType()) return false; if( ! (_munition.Equals( rhs._munition) )) ivarsEqual = false; if( ! (_warhead == rhs._warhead)) ivarsEqual = false; if( ! (_fuse == rhs._fuse)) ivarsEqual = false; if( ! (_quantity == rhs._quantity)) ivarsEqual = false; if( ! (_rate == rhs._rate)) ivarsEqual = false; return ivarsEqual; }