Compare versions
Imports System
Imports Microsoft.VisualBasic
Public Enum VersionTime
Earlier = -1
Same = 0
Later = 1
End Enum
Module MainClass1
Public Sub Main()
Dim v1 As New Version(1, 1)
Dim v1a As New Version("1.1.0")
ShowRelationship(v1, v1a)
Dim v1b As New Version(1, 1, 0, 0)
ShowRelationship(v1b, v1a)
End Sub
Private Sub ShowRelationship(ByVal v1 As Version, ByVal v2 As Version)
Console.WriteLine("Relationship of {0} to {1}: {2}",
v1, v2, CType(v1.CompareTo(v2), VersionTime))
End Sub
End Module
Related examples in the same category