public override bool Equals(object obj) { Good7 rhs = obj as Good7; if ((object)rhs == null) { return(false); } return(this == rhs); }
public override bool Equals(object rhsObj) { if (rhsObj == null) { return(false); } Good7 rhs = rhsObj as Good7; return(DoIsEquals(rhs)); // calls an instance method }
public override bool Equals(object rhsObj) { if (rhsObj == null) { return(false); } if (GetType() != rhsObj.GetType()) { return(false); } Good7 rhs = (Good7)rhsObj; // OK because of the GetType call return(x == rhs.x && y == rhs.y); }
public bool Equals(Good7 rhs) { return x == rhs.x && y == rhs.y; }
private bool DoIsEquals(Good7 rhs) { return m_name == rhs.m_name && m_address == rhs.m_address; }
private bool DoIsEquals(Good7 rhs) { return(m_name == rhs.m_name && m_address == rhs.m_address); }
public bool Equals(Good7 rhs) { return(x == rhs.x && y == rhs.y); }