ValueEquals Method

[VB]

Public Function ValueEquals(ByVal value As [Type]) As Boolean

Public Shared Function ValueEquals(ByVal leftSide As [Type], ByVal rightSide As [Type]) As Boolean

[C#]

public System.Boolean ValueEquals([Type] value)

public static System.Boolean ValueEquals([Type] leftSide, [Type] rightSide)

 

Above, [Type] is a placeholder for the type of the objects to be checked for equality.

 

Description

The ValueEquals method is a member of many classes in GeoCalcNET.  It returns a boolean value indicating if the two instances have the same value.

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 ValueEquals method for the AngularValue object, but the usage is the same for all objects.

 

Example

[VB]

Private Sub GeoCalcNET_ValueEquals(ByVal av1 As GeoCalcNET.AngularValue, ByVal av2 As GeoCalcNET.AngularValue)

If av1.ValueEquals(av2) Then

' then they are equal

End If

 

If GeoCalcNET.AngularValue.ValueEquals(av1, av2) Then

' then they are equal

End If

End Sub

 

[C#]

private void GeoCalcNET_ValueEquals(GeoCalcNET.AngularValue av1, GeoCalcNET.AngularValue av2)

{

if(av1.ValueEquals(av2))

{

// then they are equal

}

 

if(GeoCalcNET.AngularValue.ValueEquals(av1, av2))

{

// then they are equal

}

}