FileVersionInfo.ProductMinorPart 屬性

定義

取得與這個檔案關聯的產品版本號碼的次要部分。

public:
 property int ProductMinorPart { int get(); };
public int ProductMinorPart { get; }
member this.ProductMinorPart : int
Public ReadOnly Property ProductMinorPart As Integer

屬性值

代表產品版本號碼次要部分的值,如果檔案未包含版本資訊,則為 null

範例

下列範例會呼叫 GetVersionInfo 以取得 FileVersionInfo [記事本] 的 。 然後它會在文字框中列印 ProductMinorPart 。 此程式代碼假設 textBox1 已具現化。

private:
    void GetProductMinorPart()
    {
        // Get the file version for the notepad.
        FileVersionInfo^ myFileVersionInfo =
            FileVersionInfo::GetVersionInfo( Environment::SystemDirectory + "\\Notepad.exe" );

        // Print the product minor part number.
        textBox1->Text = String::Concat( "Product minor part number: ", myFileVersionInfo->ProductMinorPart );
    }
private void GetProductMinorPart()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the product minor part number.
    textBox1.Text = "Product minor part number: " + myFileVersionInfo.ProductMinorPart;
}
Private Sub GetProductMinorPart()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print the product minor part number.
    textBox1.Text = "Product minor part number: " & myFileVersionInfo.ProductMinorPart
End Sub

備註

一般而言,版本號碼會顯示為「major number.minor number.build number.private part number」。 產品版本號碼是保留版本號碼的64位號碼,如下所示:

這個屬性會取得第二組 16 位。

適用於

另請參閱