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 = String::Concat( "Product build part number: ", myFileVersionInfo->ProductBuildPart );
}
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位是 ProductMajorPart 數位。
接下來的16位是 ProductMinorPart 數位。
第三組 16 位是 ProductBuildPart 數位。
最後16位是 ProductPrivatePart 數位。
這個屬性會取得第三組 16 位。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應