Gnip.Client.Resource.Place.Equals C# (CSharp) Méthode

Equals() public méthode

Determines whether the specified Object is equal to the current Object. Ths performs a deep equals.
public Equals ( object o ) : bool
o object the specifies object
Résultat bool
        public override bool Equals(object o)
        {
            if (this == o)
                return true;
            if (o == null || GetType() != o.GetType())
                return false;

            Place that = (Place)o;

            return
                (this.Point == that.Point &&
                this.Elevation == that.Elevation &&
                this.Floor == that.Floor &&
                string.Equals(this.FeatureTypeTag, that.FeatureTypeTag) &&
                string.Equals(this.FeatureName, that.FeatureName) &&
                string.Equals(this.RelationshipTag, that.RelationshipTag));
        }

Usage Example

Exemple #1
0
 private void TestDeepEquals(Place objectA, Place objectB, bool expect, bool expectDeep)
 {
     Assert.AreEqual(expectDeep, objectA.DeepEquals(objectB));
     Assert.AreEqual(expectDeep, objectB.DeepEquals(objectA));
     Assert.AreEqual(expect, objectA.Equals(objectB));
     Assert.AreEqual(expect, objectB.Equals(objectA));
 }