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



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

Parameters

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

TdPeriodDate Structure
TdPeriodDate Members
Overload List