DateTimeWithZone.Compare MethodDateTimeWithZone.Compare MethodDateTimeWithZone::Compare Method

Syntax

Public Shared Function Compare( _
    dateTime1 As DateTimeWithZone, _
    dateTime2 As DateTimeWithZone, _
    implicitTimeZone As TimeZone _
) As Integer
public static int Compare(
    DateTimeWithZone dateTime1,
    DateTimeWithZone dateTime2,
    TimeZone implicitTimeZone
)
public:
static int Compare(
    DateTimeWithZone dateTime1, 
    DateTimeWithZone dateTime2, 
    TimeZone implicitTimeZone
)
 

Return Value

Type: System.Int32System.Int32System::Int32

A signed number that indicates the relative order of dateTime1 and dateTime2. The return value has the following meanings:

  • Less than zero indicates that dateTime1 is less than dateTime2.
  • Zero indicates that dateTime1 is equal to dateTime2.
  • Greater than zero indicates that dateTime1 is greater than dateTime2.