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



Teradata.Client.Provider Namespace > TdPeriodDate Structure > Equals Method : Equals(Object) Method
A TdPeriodDate that will be compared to this instance of TdPeriodDate.
Compares this instance against obj to determine whether they are equal.
Syntax
'Declaration
 
Public Overloads Overrides Function Equals( _
   ByVal obj As Object _
) As Boolean
'Usage
 
Dim instance As TdPeriodDate
Dim obj As Object
Dim value As Boolean
 
value = instance.Equals(obj)
public override bool Equals( 
   object obj
)
public:
bool Equals( 
   Object^ obj
) override 

Parameters

obj
A TdPeriodDate that will be compared to this instance of TdPeriodDate.

Return Value

true is returned if the two TdPeriodDates are equal, false otherwise.
Remarks

In order for two periods to be equivalent both their beginning and ending bounds must be equivalent.

The boolean that is returned indicates the following conditions:

false will be returned if:

true will be returned if:

Example
The following code example uses various comparison methods and operators:
TdPeriodDate  later = new TdPeriodDate(new TdDate(2010, 8, 31), new TdDate(2010, 12, 1));
Object earlier = new TdPeriodDate(new TdDate(2007, 9, 10), new TdDate(2008, 1, 1));
 
// The following comparison is equivalent to using
//    false == TdPeriodDate.Equals(later, (TdPeriodDate) earlier)
//    later != (TdPeriodDate) earlier
//    true == TdPeriodDate.NotEquals(later, (TdPeriodDate) earlier)
//    
if (false == later.Equals(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