FileVersionInfo.ProductBuildPart 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會取得該檔案所關聯產品的組號。
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
備註
通常,版本號會顯示為「主要號.次要號.製造號.私人零件號」。 產品版本號是一種 64 位元的編號,其版本號如下:
前16位元是 ProductMajorPart 數字。
接下來的 16 位元就是 ProductMinorPart 數字。
第三組 16 位元是 ProductBuildPart 數字。
最後16位元是 ProductPrivatePart 數字。
此性質獲得第三組 16 位元。