Mono Class Library: System.Version Overview | Members

System.Version.CompareTo Method

Returns the sort order of the current instance compared to the specified Version. [Edit]

public int CompareTo (Version value)

Parameters

value
Documentation for this section has not yet been entered. [Edit]

Returns

The return value is a negative number, zero, or a positive number reflecting the sort order of the current instance as compared to version. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

Return ValueDescription
A negative number Current instance < value.
ZeroCurrent instance == value.
A positive number

Current instance > value, or value is a null reference.

[Edit]

Remarks

Note:

The components of Version in decreasing order of importance are: major, minor, build, and revision. An undefined component is assumed to be older than any defined component.

Note: This method is implemented to support the IComparable<Version> interface.

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0