Compares two TdPeriodDate structures to determine whether the operand is equal to the operand.
Parameters
- left
- An instance of TdPeriodDate.
- right
- An instance of TdPeriodDate.
Return Value
A boolean is returned that indicates the result of the comparison.
The following example shows that the Equality operator can safely be used in an if statement.
TdPeriodDate x = TdPeriodDate.Null;
TdPeriodDate y = new TdPeriodDate(new TdDate(2008, 10, 10), new TdDate(2008, 11, 30));
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 = TdPeriodDate.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