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



Teradata.Client.Provider Namespace > TdPeriodTimestampWithTimeZone Structure > Equals Method : Equals(Object) Method
A TdPeriodTimestampWithTimeZone that will be compared to this instance of TdPeriodTimestampWithTimeZone.
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 TdPeriodTimestampWithTimeZone
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 TdPeriodTimestampWithTimeZone that will be compared to this instance of TdPeriodTimestampWithTimeZone.

Return Value

true is returned if the two TdPeriodTimestampWithTimeZones 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:
TdPeriodTimestampWithTimeZone  later = 
        new TdPeriodTimestampWithTimeZone(new TdTimestampWithTimeZone(2010, 8, 31, 10, 11, 0, 0, new TimeSpan(8, 0, 0)), 
                              new TdTimestampWithTimeZone(2010, 12, 1, 12, 21, 0, 0, new TimeSpan(8, 0, 0)));
Object earlier = 
        new TdPeriodTimestampWithTimeZone(new TdTimestamp(2007, 9, 10, 1, 22, 21, 0, new TimeSpan(8, 0, 0)), 
                              new TdTimestamp(2008, 1, 1, 3, 15, 33, 0, new TimeSpan(8, 0, 0)));
 
// The following comparison is equivalent to using
//    false == TdPeriodTimestampWithTimeZone.Equals(later, (TdPeriodTimestampWithTimeZone)earlier)
//    later !=  (TdPeriodTimestampWithTimeZone) earlier
//    true == TdTimestamp.NotEquals(later, (TdPeriodTimestampWithTimeZone) earlier)
//    
if (false == later.Equals(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