FilePrivatePart Property

FileVersionInfo.FilePrivatePart Property

Gets the file private part number.

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

Property Value

A value representing the file private part number.

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:

  • The first 16 bits are the FileMajorPart number.
  • The next 16 bits are the FileMinorPart number.
  • The third set of 16 bits are the FileBuildPart number.
  • The last 16 bits are the FilePrivatePart number.

This property gets the last set of 16 bits.

Example

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

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

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

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

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

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

Show:
© 2016 Microsoft