public bool Equals(Turn t) { // If parameter is null return false: if ((object)t == null) { return(false); } // Return true if the fields match: return((Active.Equals(t.Active)) && (Passive.Equals(t.Passive))); }
public override bool Equals(System.Object obj) { // If parameter is null return false. if (obj == null) { return(false); } if ((System.Object)obj == null) { return(false); } // If parameter cannot be cast to Turn return false. Turn t = obj as Turn; // Return true if the fields match: return((Active.Equals(t.Active)) && (Passive.Equals(t.Passive))); }