Version::Revision Property


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

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

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

property int Revision {
	int get();

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.
using namespace System;

int main()
    String^ formatStandard = "Standard version:\n" +
        " = {0}.{1}.{2}.{3}";
    String^ formatInterim = "Interim version:\n" +
        " = {0}.{1}.{2}.{3}/{4}";

    Version^ standardVersion = gcnew Version(2, 4, 1128, 2);
    Version^ interimVersion = gcnew Version(2, 4, 1128, (100 << 16) + 2);

    Console::WriteLine(formatStandard, standardVersion->Major, 
        standardVersion->Minor, standardVersion->Build, 
    Console::WriteLine(formatInterim, interimVersion->Major,
        interimVersion->Minor, interimVersion->Build, 
        interimVersion->MajorRevision, interimVersion->MinorRevision);
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