Share via


Subtraction Operator

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Subtracts a specified TimeSpan from another specified TimeSpan.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Operator - ( _
    t1 As TimeSpan, _
    t2 As TimeSpan _
) As TimeSpan
public static TimeSpan operator -(
    TimeSpan t1,
    TimeSpan t2
)
public:
static TimeSpan operator -(
    TimeSpan t1, 
    TimeSpan t2
)
static let inline (-)
        t1:TimeSpan * 
        t2:TimeSpan  : TimeSpan
JScript does not support overloaded operators.

Parameters

Return Value

Type: System. . :: . .TimeSpan
An object whose value is the result of the value of t1 minus the value of t2.

.NET Framework Security

See Also

Reference

TimeSpan Structure

System Namespace