Compares this instance to a specified object and returns an indication of their relative values.
[Visual Basic] Public Overridable Function CompareTo( _ ByVal version As Object _ ) As Integer Implements IComparable.CompareTo [C#] public virtual int CompareTo( object version ); [C++] public: virtual int CompareTo( Object* version ); [JScript] public function CompareTo( version : Object ) : int;
- An object to compare, or a null reference (Nothing in Visual Basic).
|Less than zero||This instance is before version.|
|Zero||This instance is the same as version.|
|Greater than zero||This instance is subsequent to version.
version is a null reference (Nothing in Visual Basic).
|ArgumentException||version is not of type Version and is not a null reference (Nothing in Visual Basic).|
The components of Version in decreasing order of importance are: major, minor, build, and revision. An unknown component is assumed to be older than any known component.
- version 1.1 is older than version 1.1.0
- version 1.1 is older than version 1.1.1
- version 1.1 is older than version 184.108.40.206
- version 1.1.2 is older than version 220.127.116.11
- version 1.2.5 is newer than version 18.104.22.168
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