FileVersionInfo.ProductPrivatePart Property

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

Namespace: System.Diagnostics
Assembly: System (in system.dll)

public int ProductPrivatePart { get; }
/** @property */
public int get_ProductPrivatePart ()

public function get ProductPrivatePart () : int

Not applicable.

Property Value

A value representing the private part number of the product this file is associated with or a null reference (Nothing in Visual Basic) if the file did not contain version information.

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.

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.

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;
 }
    

private void GetProductPrivatePart()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = 
        FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");

    // Print the product private part number.
    textBox1.set_Text("Product private part number: " 
        + myFileVersionInfo.get_ProductPrivatePart());
} //GetProductPrivatePart

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;
 }
    

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: