# Duration.Subtraction(Duration, Duration)Duration.Subtraction(Duration, Duration)Duration.Subtraction(Duration, Duration)Duration.Subtraction(Duration, Duration) Operator

## 定義

Duration の一方のインスタンスの値をもう一方のインスタンスの値から減算します。Subtracts the value of one instance of Duration from another.

``````public:
static System::Windows::Duration operator -(System::Windows::Duration t1, System::Windows::Duration t2);``````
``public static System.Windows.Duration operator - (System.Windows.Duration t1, System.Windows.Duration t2);``
``static member ( - ) : System.Windows.Duration * System.Windows.Duration -> System.Windows.Duration``
``Public Shared Operator - (t1 As Duration, t2 As Duration) As Duration``

#### パラメーター

t1
Duration Duration Duration Duration

Duration の第 1 インスタンス。The first instance of Duration.

t2
Duration Duration Duration Duration

#### 戻り値

Duration の両方のインスタンスが値を持つ場合は、`t1` から `t2` を減算した値を表す Duration のインスタンスになります。If both instances of Duration have values, an instance of Duration that represents the value of `t1` minus `t2`. `t1`Forever の値を持ち、`t2`TimeSpan の値を持つ場合、このメソッドは Forever を返します。If `t1` has a value of Forever and `t2` has a value of TimeSpan, this method returns Forever. それ以外の場合、このメソッドは `null` を返します。Otherwise this method returns `null`.

## 注釈

この演算子の同等の方法は次のようになります。Duration.Subtract(Duration)The equivalent method for this operator is Duration.Subtract(Duration)