Version.Build Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

Public ReadOnly Property Build As Integer

Property Value

Type: System.Int32

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

For example, if the version number is 6.2.1.3, the build number is 1. If the version number is 6.2, the build 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 & _
                               "  major.minor.build.revision = {0}.{1}.{2}.{3}"
        Dim fmtInt As String = "Interim version:" & vbCrLf & _
                               "  major.minor.build.majRev/minRev = {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:
'  major.minor.build.revision = 2.4.1128.2
'Interim version:
'  major.minor.build.majRev/minRev = 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
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: