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



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

Parameters

left
A TdPeriodTimestampWithTimeZone instance.
right
A TdPeriodTimestampWithTimeZone 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 TdPeriodTimestampWithTimeZone.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.
TdDate  later = new TdPeriodTimestampWithTimeZone(
                       new TdTimestampWithTimeZone(2010, 8, 31, 0, 0, 0, 0, new TimeSpan(8, 0, 0)), 
                       new TdDate(2010, 10, 25, 12, 30, 30, 0, new TimeSpan(8, 0, 0)));
            
TdDate earlier = new TdPeriodTimestampWithTimeZone(
                       new TdTimestampWithTimeZone(2007, 8, 31, 8, 0, 30, 0, new TimeSpan(8, 0, 0)), 
                       new TdTimestampWithTimeZone(2007, 11, 12, 20, 31, 0, 0, new TimeSpan(8, 0, 0)));
 
// The following comparison methods and operators are equivalent
if (false == TdPeriodTimestampWithTimeZone.Equals(later, earlier) ||
    late != earlier ||
    true == TdPeriodTimestampWithTimeZone.NotEquals(later, earlier) )
{
   Console.WriteLine("later does not equal earlier");
}
Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdPeriodTimestampWithTimeZone Structure
TdPeriodTimestampWithTimeZone Members
Overload List