'Usage
Parameters
- left
- An instance of TdDate.
- right
- An instance of TdDate.
Return Value
A boolean is returned that indicates the result of the comparison.
'Usage
The value returned is true
if the left is equal to the right, false
otherwise.
Return Value | Description |
---|---|
true |
left and right are TdDate.Null -or- |
false |
-or- |
Unlike comparison operators, Equality operators do not always return false
when left and right operands are Null. Therefore the reverse condition can be considered true
. TdDate implementation is very similar to the Nullable class in this regard.
TdDate x = TdDate.Null; TdDate y = new TdDate(2008, 10, 10); if (x == y) { // x is equal to y. Console.WriteLine(@"X is equal to Y"). } else { // x is not equal y Console.WriteLine(@"X is not equal to Y"). } y = TdDate.Null; if (x == y) { // x is equal to y. Console.WriteLine(@"X is equal to Y"). } else { // x is not equal y Console.WriteLine(@"X is not equal to Y"). }
Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2