public bool Equals(Ssm2Packet p) { if (p == null) { return(false); } return(this.GetHashCode() == p.GetHashCode()); }
// overriding Equals, GetHashCode etc. not necessary // but provide much better performance if used public override bool Equals(object obj) { if (obj == null) { return(false); } Ssm2Packet p = obj as Ssm2Packet; if (p == null) { return(false); } // Return true if the data matches: return(this.GetHashCode() == p.GetHashCode()); }
public bool Equals(Ssm2Packet p) { if (p == null) return false; return (this.GetHashCode () == p.GetHashCode ()); }