Compares two TdPeriodTime structures to determine whether the is equal to the operand.
Parameters
- left
- An instance of TdPeriodTime.
- right
- An instance of TdPeriodTime.
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.
TdPeriodTime x = TdPeriodTime.Null;
TdPeriodTime y = new TdPeriodTime(new TdTime(10, 10, 10), new TdTime(12, 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 = TdPeriodTime.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