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 the first instance of TimeSpan is less than equal to the second instance of TimeSpan then it returns true otherwise it returns false.
Program:
The source code to demonstrate the overloaded less than or equal to (<=) operator with TimeSpan structure is given below. The given program is compiled and executed successfully.
Output: