Duration.Subtraction(Duration, Duration) Operator

Definition

Subtracts the value of one instance of Duration from another.

C#
public static System.Windows.Duration operator -(System.Windows.Duration t1, System.Windows.Duration t2);

Parameters

t1
Duration

The first instance of Duration.

t2
Duration

The instance of Duration to subtract.

Returns

If both instances of Duration have values, an instance of Duration that represents the value of t1 minus t2. If t1 has a value of Forever and t2 has a value of TimeSpan, this method returns Forever. Otherwise this method returns null.

Remarks

The following calculations all return a value of Automatic.

The equivalent method for this operator is Duration.Subtract(Duration)

Applies to

Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10