public override bool Equals(object obj)
            {
                if (!(obj is Good4))
                {
                    return(false);
                }

                Good4 rhs = (Good4)obj;                                 // cast is OK when paired with isinst

                return(State == rhs.State);
            }
Example #2
0
            public override bool Equals(object obj)
            {
                Good4 rhs = obj as Good4;

                if ((object)rhs == null)
                {
                    return(false);
                }

                return(name == rhs.name && address == rhs.address);
            }
Example #3
0
            public override bool Equals(object rhsObj)
            {
                if (rhsObj == null)
                {
                    return(false);
                }

                Good4 rhs = rhsObj as Good4;

                return(FirstName == rhs.FirstName && LastName == rhs.LastName);
            }
Example #4
0
            public override bool Equals(object rhsObj)
            {
                if (rhsObj == null)
                {
                    return(false);
                }

                Good4 rhs = rhsObj as Good4;

                return(this == rhs);
            }
Example #5
0
            public bool DoEquals(Good4 rhs)
            {
                if (object.ReferenceEquals(this, rhs))
                {
                    return(true);
                }

                if ((object)rhs == null)
                {
                    return(false);
                }

                return(address == rhs.address);                 // does not match GetHashCode but we cant catch it
            }
 // Equals calls a helper
 public bool Equals(Good4 rhs)
 {
     return DoEquals(rhs);
 }
            public bool DoEquals(Good4 rhs)
            {
                if (object.ReferenceEquals(this, rhs))
                    return true;

                if ((object) rhs == null)
                    return false;

                return address == rhs.address;	// does not match GetHashCode but we cant catch it
            }
Example #8
0
 // Equals calls a helper
 public bool Equals(Good4 rhs)
 {
     return(DoEquals(rhs));
 }