YearMonthDuration.Compare MethodYearMonthDuration.Compare MethodYearMonthDuration::Compare Method

Syntax

Public Shared Function Compare( _
    duration1 As YearMonthDuration, _
    duration2 As YearMonthDuration _
) As Integer
public static int Compare(
    YearMonthDuration duration1,
    YearMonthDuration duration2
)
public:
static int Compare(
    YearMonthDuration duration1, 
    YearMonthDuration duration2
)
 

Return Value

Type: System.Int32System.Int32System::Int32

A signed number that indicates the relative order of duration1 and duration2. The return value has the following meanings.

  • Less than zero indicates that duration1 is less than duration2.
  • Zero indicates that duration1 is equal to duration2.
  • Greater than zero indicates that duration1 is greater than duration2.