Duration.Compare(Duration, Duration) Duration.Compare(Duration, Duration) Duration.Compare(Duration, Duration) Duration.Compare(Duration, Duration) Method

定義

一方の Duration 値をもう一方の値と比較します。Compares one Duration value to another.

public:
 static int Compare(System::Windows::Duration t1, System::Windows::Duration t2);
public static int Compare (System.Windows.Duration t1, System.Windows.Duration t2);
static member Compare : System.Windows.Duration * System.Windows.Duration -> int
Public Shared Function Compare (t1 As Duration, t2 As Duration) As Integer

パラメーター

t1
Duration Duration Duration Duration

比較対象の Duration の第 1 インスタンス。The first instance of Duration to compare.

t2
Duration Duration Duration Duration

比較対象の Duration の第 2 インスタンス。The second instance of Duration to compare.

戻り値

t1t2 より小さい場合は、その差を表す負の値です。If t1 is less than t2, a negative value that represents the difference. t1t2 に等しい場合は、0 です。If t1 is equal to t2, zero. t1t2 より大きい場合は、その差を表す正の値です。If t1 is greater than t2, a positive value that represents the difference.

注釈

Duration インスタンスのプロパティ値を持つAutomaticは次の戻り値を持つ特殊なケースです。Duration instances with a property value of Automatic are a special case with the following return values.

  • 場合t1自動とt2は、-1 が返されます。If t1 is Automatic and t2 is not, -1 is returned.

  • 場合t1自動とt2は自動にも 0 が返されます。If t1 is Automatic and t2 is also Automatic, 0 is returned.

  • 場合t1自動でないとt2自動、1 が返されます。If t1 is not Automatic and t2 is Automatic, 1 is returned.

適用対象