Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Version.Build Property

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

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

public int Build { get; }

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 example demonstrates the Version constructor and the Major, Minor, Build, and Revision properties.


// This example demonstrates the Version.Revision,
// MajorRevision, and MinorRevision properties.
using System;

class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {

      string fmtStd = "Standard version:\n" +
                      "  major.minor.build.revision = {0}.{1}.{2}.{3}";
      string fmtInt = "Interim version:\n" +
                      "  major.minor.build.revision = {0}.{1}.{2}.{3}";

      Version std = new Version(2, 4, 1128, 2);
      Version interim = new Version(2, 4, 1128, (100 << 16) + 2);

      outputBlock.Text += String.Format(fmtStd, std.Major, std.Minor, std.Build, std.Revision) + "\n";
      outputBlock.Text += String.Format(fmtInt, interim.Major, interim.Minor, 
                                        interim.Build, interim.Revision) + "\n";
   }
}
/*
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

*/


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft