System.Version.op_GreaterThan Method

Determines whether the first specified Version object is greater than the second specified Version object.

Syntax

public static bool operator> (Version v1, Version v2)

Parameters

v1
The first Version object.
v2
The second Version object.

Returns

true if v1 is greater than v2; otherwise, false.

Exceptions

TypeReason
ArgumentNullException v2 is a null reference.

Remarks

The parts of the version number are compared independently starting with the Version.Major property and then the Version.Minor, Version.Build, and Version.Revision properties, in order. This method returns as soon as one of the properties is determined not to be equal.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0