/** * Compares for reference equality and value equality. */ public bool equals(EntityID rhs) { bool ivarsEqual = true; if (rhs.GetType() != this.GetType()) { return(false); } if (!(_site == rhs._site)) { ivarsEqual = false; } if (!(_application == rhs._application)) { ivarsEqual = false; } if (!(_entity == rhs._entity)) { 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(EntityID rhs) { bool ivarsEqual = true; if(rhs.GetType() != this.GetType()) return false; if( ! (_site == rhs._site)) ivarsEqual = false; if( ! (_application == rhs._application)) ivarsEqual = false; if( ! (_entity == rhs._entity)) ivarsEqual = false; return ivarsEqual; }