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



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

Parameters

left
A TdPeriodTimestamp instance.
right
A TdPeriodTimestamp 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 TdPeriodTimestamp.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.
TdPeriodTimestmap  later = new TdPeriodTimestamp(
    new TdTimestamp(2010, 8, 31, 19, 0, 0, 0), new TdTimestamp(2010, 10, 25, 23, 0, 0, 0));
            
TdPeriodTimestamp earlier = new TdPeriodTimestamp(
    new TdDate(2007, 8, 31, 10, 12, 0, 0), new TdTimestamp(2007, 11, 12, 21, 0, 0, 0));
 
// The following comparison methods and operators are equivalent
if (false == TdPeriodTimestamp.Equals(later, earlier) ||
    late != earlier ||
    true == TdPeriodTimestamp.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

TdPeriodTimestamp Structure
TdPeriodTimestamp Members
Overload List