Delen via


Calendar.CompareDateTime(DateTime) Method

Definition

Compares this calendar to a DateTime object and indicates whether the date and time of one is earlier, equal to, or later than that of the other.

public:
 virtual int CompareDateTime(DateTime other) = CompareDateTime;
int CompareDateTime(DateTime const& other);
public int CompareDateTime(System.DateTimeOffset other);
function compareDateTime(other)
Public Function CompareDateTime (other As DateTimeOffset) As Integer

Parameters

other
DateTime DateTimeOffset

The DateTime object to compare to the current calendar.

Returns

Int32

int

One of the following values:

Return valueDescription
Less than zeroThe date and time of this calendar is earlier than that of *other*.
ZeroThe date and times are equal.
Greater than zeroThe date and time of this calendar is later than that of *other*.

Applies to

See also