This documentation is archived and is not being maintained.

Version Less Than Operator

Determines whether the first specified instance of Version is less than the second specified instance of Version.

[Visual Basic]
returnValue = Version.op_LessThan(v1, v2)
[C#]
public static bool operator <(
 Version v1,
 Version v2
);
[C++]
public: static bool op_LessThan(
 Version* v1,
 Version* v2
);
[JScript]
returnValue = v1 < v2;

[Visual Basic] In Visual Basic, you can use the operators defined by a type, but you cannot define your own. You can use the CompareTo method instead of the Version less than operator.

[JScript] In JScript, you can use the operators defined by a type, but you cannot define your own.

Arguments [Visual Basic, JScript]

v1
The first instance of Version.
v2
The second instance of Version.

Parameters [C#, C++]

v1
The first instance of Version.
v2
The second instance of Version.

Return Value

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

Exceptions

Exception Type Condition
ArgumentNullException v1 is a null reference (Nothing in Visual Basic).

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Version Class | Version Members | System Namespace | Equals | CompareTo

Show: