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



Teradata.Client.Provider Namespace > TdPeriodTime Structure > Equals Method : Equals(TdPeriodTime,TdPeriodTime) Method
A TdPeriodTime instance.
A TdPeriodTime instance.
Compares two TdPeriodTime structures to determine whether they are equal.
Syntax
'Declaration
 
Public Overloads Shared Function Equals( _
   ByVal left As TdPeriodTime, _
   ByVal right As TdPeriodTime _
) As Boolean
'Usage
 
Dim left As TdPeriodTime
Dim right As TdPeriodTime
Dim value As Boolean
 
value = TdPeriodTime.Equals(left, right)
public static bool Equals( 
   TdPeriodTime left,
   TdPeriodTime right
)
public:
static bool Equals( 
   TdPeriodTime left,
   TdPeriodTime right
) 

Parameters

left
A TdPeriodTime instance.
right
A TdPeriodTime instance.

Return Value

A boolean is returned that indicates the result of the comparison.

Remarks

To determine whether two periods are equal, the beginning and ending bounds between the left and right operands are compared. The two periods are equal if the following is true:

    left.Begin == right.Begin && left.End == right.Begin

The value returned is true if the left is equal to the right, false otherwise.

Return Value Description
true

left and right are TdPeriodTime.Null

-or-

left is equal to right.

false

left or right is Null

-or-

left is not equal to right.

Example
The following code example uses various comparison methods and operators.
TdPeriodTime  later = new TdPeriodTime(
    new TdTime(09, 8, 31, 0), new TdTime(14, 10, 25, 0));
            
TdPeriodTime earlier = new TdPeriodTime(
    new TdTime(01, 8, 31, 0), new TdTime(05, 0, 0, 0);
 
// The following comparison methods and operators are equivalent
if (false == TdPeriodTime.Equals(later, earlier) ||
    late != earlier ||
    true == TdPeriodTime.NotEquals(later, earlier) )
{
   Console.WriteLine(“later does not equal earlier”);
}
Requirements

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

See Also

Reference

TdPeriodTime Structure
TdPeriodTime Members
Overload List