Syntax:
bool TimeSpan.operator==(TimeSpan timeSpan1, TimeSpan timeSpan2);
Parameter(s):
- timeSpan1: timeSpan1 to be compared.
- timeSpan2: timeSpan2 to be compared.
Return value:
This method returns a boolean value, if two instances are equal then it returns true. Otherwise, it returns false.
Program:
The source code to demonstrate the equality (==) operator with TimeSpan structure is given below. The given program is compiled and executed successfully.
Output: