C# program to demonstrate the unary minus (-) operator with TimeSpan structure
using System;
class TimeSpanDemo
{
//Entry point of Program
static public void Main()
{
TimeSpan timeInterval = new TimeSpan(4, 10, 15);
Console.WriteLine(+timeInterval);
}
}
Output
-04:10:15
Press any key to continue . . .
Table of Contents