FileVersionInfo.ProductBuildPart プロパティ

定義

このファイルが関連付けられている製品のビルド番号を取得します。

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

プロパティ値

このファイルが関連付けられている製品のビルド番号を表す値。ファイルにバージョン情報が含まれていない場合は null

次の例では、 GetVersionInfo を呼び出してメモ帳の FileVersionInfo を取得します。 次に、テキスト ボックスに ProductBuildPart を出力します。 このコードでは、 textBox1 がインスタンス化されていることを前提としています。

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

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

注釈

通常、バージョン番号は "major number.minor number.build number.private part number" として表示されます。 製品バージョン番号は、次のようにバージョン番号を保持する 64 ビット番号です。

このプロパティは、16 ビットの 3 番目のセットを取得します。

適用対象

こちらもご覧ください