Equals Method

public override bool Equals([Type] leftSide, [Type] rightSide)

public override bool Equals([Type] value)

 

Above, [Type] is a placeholder for the class name of the objects to be compared.

 

Description

The Equals method is a member of many classes in GeoCalc. There are two signatures for this method. The first one takes a single argument and checks to see if it's value matches the value of the current instance.  It returns True if the two instances have the same value and false if they do not.  The second signature takes two arguments of the same type, and returns a boolean value indicating whether they have the same value.  

The following example shows how to use the Equals method for the ProjectedCoordSys object, but the usage is the same for all objects.

 

Example

void Equals(GeoCalc.ProjectedCoordSys cs1, GeoCalc.ProjectedCoordSys cs2)

{

if(GeoCalc.ProjectedCoordSys.Equals(cs1, cs2))

{

// then they are equal

}

if(cs1.Equals(cs2))

{

// then they are equal

}

}