Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DateTimeOffset::IComparable::CompareTo Method (Object^)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Compares the value of the current DateTimeOffset object with another object of the same type.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

private:
virtual int CompareTo(
	Object^ obj
) sealed = IComparable::CompareTo

Parameters

obj
Type: System::Object^

The object to compare with the current DateTimeOffset object.

Return Value

Type: System::Int32

A 32-bit signed integer that indicates whether the current DateTimeOffset object is less than, equal to, or greater than obj. The return values of the method are interpreted as follows:

Return Value

Description

Less than zero

The current DateTimeOffset object is less than (earlier than) obj.

Zero

The current DateTimeOffset object is equal to (the same point in time as) obj.

Greater than zero

The current DateTimeOffset object is greater than (later than) obj.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft