C# TimeSpan UnaryPlus
Description
TimeSpan UnaryPlus
returns the specified instance of
TimeSpan.
Syntax
TimeSpan.UnaryPlus
has the following syntax.
public static TimeSpan operator +(
TimeSpan t
)
Parameters
TimeSpan.UnaryPlus
has the following parameters.
t
- The time interval to return.
Returns
TimeSpan.UnaryPlus
method returns The time interval specified by t.
Example
The following example applies the UnaryPlus operator to several TimeSpan objects.
using System;// w w w . ja v a 2 s . c om
class MainClass
{
static void Main( )
{
TimeSpan Left = new TimeSpan( 2, 0, 0 );
Console.WriteLine( + Left);
}
}
The code above generates the following result.