public override bool Equals(object rhsObj) { if (rhsObj == null) { return(false); } Good3 rhs = rhsObj as Good3; return(m_firstName == rhs.m_firstName && m_lastName == rhs.m_lastName); }
public override bool Equals(object obj) { Good3 rhs = obj as Good3; if ((object)rhs == null) { return(false); } return(name == rhs.name && weight == rhs.weight); }
public override bool Equals(object rhsObj) { if (rhsObj == null) { return(false); } Good3 rhs = (Good3)rhsObj; return(this == rhs); }
public override bool Equals(object rhsObj) { if (rhsObj == null) { return(false); } if (GetType() != rhsObj.GetType()) { return(false); } Good3 rhs = (Good3)rhsObj; return(x == rhs.x && y == rhs.y); }
// Equals matches GetHashCode public override bool Equals(object rhsObj) { if (object.ReferenceEquals(this, rhsObj)) { return(true); } Good3 rhs = rhsObj as Good3; if (rhs == null) { return(false); } return(name == rhs.name && address == rhs.address); }
public void Verify3E() { if (!Timer.gameEnded && !EquationControl.verified3 && !EquationControl.controlLoss) { if (EquationControl.n6 == EquationControl.CorrectInts[2]) { Bad3.SetActive(false); Good3.SetActive(true); FindObjectOfType <SoundManager>().PlaySound("success3"); EquationControl.score++; EquationControl.verified3 = true; } else { FindObjectOfType <SoundManager>().PlaySound("incorrectanswer"); Bad3.SetActive(true); } } }
public static Point ToPointType(Good3 size) { return new Point(size.m_width, size.m_height); }
public static Point ToPointType(Good3 size) { return(new Point(size.m_width, size.m_height)); }
// OK to access non-this field. public void Write(Good3 other) { Console.WriteLine(other.flag); }
// OK to call a non-this method. public void Write(Good3 other, string message) { other.Write(message); }
public bool Equals(Good3 rhs) { return this == rhs; }
public bool Equals(Good3 rhs) { return(this == rhs); }