Negate TimeSpan value in CSharp
Description
The following code shows how to negate TimeSpan value.
Example
using System;//from w w w.java 2 s. co m
class DuraNegaUnaryDemo
{
static void Main()
{
TimeSpan ts = new TimeSpan( 1 );
Console.WriteLine( ts.Negate( ) );
}
}
The code above generates the following result.