This documentation is archived and is not being maintained.

FileVersionInfo.ProductBuildPart Property

Gets the build number of the product this file is associated with.

[Visual Basic]
Public ReadOnly Property ProductBuildPart As Integer
[C#]
public int ProductBuildPart {get;}
[C++]
public: __property int get_ProductBuildPart();
[JScript]
public function get ProductBuildPart() : int;

Property Value

A value representing the build number of the product this file is associated with.

Remarks

Typically, a version number is displayed as "major number.minor number.build number.private part number". A product version number is a 64-bit number that holds the version number as follows:

This property gets the third set of 16 bits.

Example

The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it prints the ProductBuildPart in a text box. This code assumes textBox1 has been instantiated.

[Visual Basic] 
Private Sub GetProductBuildPart()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print the product build part number.
    textBox1.Text = "Product build part number: " & myFileVersionInfo.ProductBuildPart
End Sub 'GetProductBuildPart

[C#] 
private void GetProductBuildPart() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print the product build part number.
    textBox1.Text = "Product build part number: " + myFileVersionInfo.ProductBuildPart;
 }
    

[C++] 
private:
void GetProductBuildPart() {
    // Get the file version for the notepad.
    FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
 
    // Print the product build part number.
    textBox1->Text = String::Format( S"Product build part number: {0}", __box(myFileVersionInfo->ProductBuildPart));
 }
    

[JScript] 
private function GetProductBuildPart() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print the product build part number.
    textBox1.Text = "Product build part number: " + myFileVersionInfo.ProductBuildPart;
 }
    

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileVersionInfo Class | FileVersionInfo Members | System.Diagnostics Namespace | ProductVersion | ProductMajorPart | ProductMinorPart | ProductPrivatePart

Show: