DateTime::CompareTo Method
.NET Framework (current version)
Compares the value of this instance to a specified DateTime value and indicates whether this instance is earlier than, the same as, or later than the specified DateTime value.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | CompareTo(DateTime) | |
![]() | CompareTo(Object^) |
The two overloads of the CompareTo method return a signed number that indicates the relative value of this instance and the value argument, as shown in the following table.
Value | Description |
|---|---|
Less than zero | This instance is earlier than value. |
Zero | This instance is the same as value. |
Greater than zero | This instance is later than value. |
Show:
