Version.Revision Property


Gets the value of the revision component of the version number for the current Version object.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

Public ReadOnly Property Revision As Integer

Property Value

Type: System.Int32

The revision number, or -1 if the revision number is undefined.

For example, if the version number is, the revision number is 3. If the version number is 6.2, the revision number is undefined.

The following code example demonstrates the Version constructor, and Major, Minor, Build, Revision, MajorRevision, and MinorRevision properties.

' This example demonstrates the Version.Revision,
' MajorRevision, and MinorRevision properties.

Imports System

Class Sample
    Public Shared Sub Main() 
        Dim fmtStd As String = "Standard version:" & vbCrLf & _
                               " = {0}.{1}.{2}.{3}"
        Dim fmtInt As String = "Interim version:" & vbCrLf & _
                               " = {0}.{1}.{2}.{3}/{4}"

        Dim std As New Version(2, 4, 1128, 2)
        Dim interim As New Version(2, 4, 1128, (100 << 16) + 2)

        Console.WriteLine(fmtStd, std.Major, std.Minor, std.Build, std.Revision)
        Console.WriteLine(fmtInt, interim.Major, interim.Minor, interim.Build, _
                          interim.MajorRevision, interim.MinorRevision)
    End Sub 'Main
End Class 'Sample

'This code example produces the following results:
'Standard version:
' = 2.4.1128.2
'Interim version:
' = 2.4.1128.100/2

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top