Export (0) Print
Expand All

FileVersionInfo.FileBuildPart Property

Gets the build number of the file.

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

Property Value

A value representing the build number of the file.

Remarks

Typically, a version number is displayed as "major number.minor number.build number.private part number". A file version number is a 64-bit number that holds the version number for a file 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 FileBuildPart in a text box. This code assumes textBox1 has been instantiated.

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

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

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

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

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 | FileMajorPart | FileMinorPart | FileVersion | Version | FilePrivatePart

Show:
© 2015 Microsoft