Export (0) Print
Expand All

FileVersionInfo.ProductMinorPart Property

Gets the minor part of the version number for the product the file is associated with.

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

Property Value

A value representing the minor part of the product version number.

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 second set of 16 bits.

Example

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

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

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

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

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

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

Show:
© 2014 Microsoft