Export (0) Print
Expand All

FileVersionInfo.ProductPrivatePart Property

Gets the private part number of the product this file is associated with.

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

Property Value

A value representing the private part 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 last set of 16 bits.

Example

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

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

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

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

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

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 | ProductBuildPart | ProductMinorPart | ProductMajorPart | ProductVersion

Show:
© 2014 Microsoft