public override bool Equals(object obj) { Good2 rhs = obj as Good2; if ((object)rhs == null) { return(false); } return(name == rhs.name && weight == rhs.weight); }
public int CompareTo(Good2 rhs) { int result = m_name.CompareTo(rhs.m_name); if (result == 0) { result = m_address.CompareTo(rhs.m_address); } return(result); }
public override bool Equals(object rhsObj) { if (rhsObj == null) { return(false); } Good2 rhs = rhsObj as Good2; return(m_name == rhs.m_name && m_address == rhs.m_address); }
public override bool Equals(object rhsObj) { if (rhsObj == null) { return(false); } Good2 rhs = rhsObj as Good2; return(this == rhs); }
public static bool operator==(Good3 lhs, Good3 rhs) { Good2 ick = new Good2(); if (lhs.name == ick.IckyField) // ok to use fields from other types { return(rhs.name.Length == 0 && lhs.weight == rhs.weight); } else { return(lhs.name == rhs.name && lhs.weight == rhs.weight); } }
// Equals matches GetHashCode public bool Equals(Good2 rhs) { if (object.ReferenceEquals(this, rhs)) { return(true); } if ((object)rhs == null) { return(false); } return(name == rhs.name && address == rhs.address); }
public void Verify2E() { if (!Timer.gameEnded && !EquationControl.verified2 && !EquationControl.controlLoss) { if (EquationControl.n3 == EquationControl.CorrectInts[1]) { Bad2.SetActive(false); Good2.SetActive(true); FindObjectOfType <SoundManager>().PlaySound("success3"); EquationControl.score++; EquationControl.verified2 = true; } else { FindObjectOfType <SoundManager>().PlaySound("incorrectanswer"); Bad2.SetActive(true); } } }
public bool Equals(Good2 rhs) { if (object.ReferenceEquals(this, rhs)) { return(true); } if ((object)rhs == null) { return(false); } if (!base.Equals(rhs)) { return(false); } return(state == rhs.state); }
// Equals matches GetHashCode public bool Equals(Good2 rhs) { if (object.ReferenceEquals(this, rhs)) return true; if ((object) rhs == null) return false; return name == rhs.name && address == rhs.address; }
public bool Equals(Good2 rhs) { if (object.ReferenceEquals(this, rhs)) return true; if ((object) rhs == null) return false; if (!base.Equals(rhs)) return false; return state == rhs.state; }