Edit

Share via


Version.IComparable.CompareTo(Object) Method

Definition

Compares the current Version object to a specified object and returns an indication of their relative values.

C#
int IComparable.CompareTo(object version);

Parameters

version
Object

An object to compare, or null.

Returns

A signed integer that indicates the relative values of the two objects, as shown in the following table:

Return valueMeaning
Less than zeroThe current Version object is a version before version.
ZeroThe current Version object is the same version as version.
Greater than zeroThe current Version object is a version subsequent to version, or version is null.

Implements

Remarks

This member is an explicit interface member implementation.

Applies to

Product Versions
.NET Core 1.0, Core 1.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6
UWP 10.0