Send feedback on this topic.
Teradata.Client.Provider
Equals(Object) Method
Example 



Teradata.Client.Provider Namespace > TdIntervalHourToSecond Structure > Equals Method : Equals(Object) Method
TdIntervalHourToSecond that will be compared to this instance of TdIntervalHourToSecond.
Compares this instance and obj to determine whether they are equal.
Syntax
'Declaration
 
Public Overloads Overrides Function Equals( _
   ByVal obj As Object _
) As Boolean
'Usage
 
Dim instance As TdIntervalHourToSecond
Dim obj As Object
Dim value As Boolean
 
value = instance.Equals(obj)
public override bool Equals( 
   object obj
)
public:
bool Equals( 
   Object^ obj
) override 

Parameters

obj
TdIntervalHourToSecond that will be compared to this instance of TdIntervalHourToSecond.

Return Value

true if the two TdIntervalHourToSeconds are equal, false otherwise.
Remarks

The return value is true if the instance is equal to the obj, false otherwise.

Return Value Description
true

This instance and obj are TdIntervalHourToSecond.Null.

-or-

This instance is equal to obj.

false

This instance is not equal to obj.

-or-

This instance is not Null and obj is Null.

-or-

This instance is Null and obj is not Null

-or-

obj is a null reference.

Example
The following code example uses various comparison methods and operators.
// Create TdIntervalHourToSecond with 5 days, 1 hour, 30 minutes, 0 seconds,
//  default precision and scale
TdIntervalHourToSecond firstInterval = new TdIntervalHourToSecond(125, 30, 0);
// Create TdIntervalHourToSecond with 20 days, 2 hour, 30 minutes, 0 seconds,
//  default precision and scale
Object intervalObj = new TdIntervalHourToSecond(482, 30, 0);
 
// The following comparison methods and operators are equivalent
if (false == TdIntervalHourToSecond.Equals(firstInterval, (TdIntervalHourToSecond)intervalObj) ||
    firstInterval != (TdIntervalHourToSecond)intervalObj ||
    false == firstInterval.Equals(intervalObj) )
{
   Console.WriteLine(“firstInterval does not equal intervalObj”);
}
Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdIntervalHourToSecond Structure
TdIntervalHourToSecond Members
Overload List