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



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

Parameters

left
A TdPeriodTimeWithTimeZone instance.
right
A TdPeriodTimeWithTimeZone 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 TdPeriodTimeWithTimeZone.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.
TdPeriodTimeWithTimeZone  later = new TdPeriodTimeWithTimeZone(
    new TdTimeWithTimeZone(09, 8, 31, 0), new TdTimeWithTimeZone(14, 10, 25, 0));
            
TdPeriodTimeWithTimeZone earlier = new TdPeriodTimeWithTimeZone(
    new TdTimeWithTimeZone(01, 8, 31, 0), new TdTimeWithTimeZone(05, 0, 0, 0);
 
// The following comparison methods and operators are equivalent
if (false == TdPeriodTimeWithTimeZone.Equals(later, earlier) ||
    late != earlier ||
    true == TdPeriodTimeWithTimeZone.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

TdPeriodTimeWithTimeZone Structure
TdPeriodTimeWithTimeZone Members
Overload List