語言

FileVersionInfo.FileBuildPart 屬性

定義

取得檔案的建置號。

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

屬性值

一個代表檔案建置號的值,或 null 若檔案未包含版本資訊。

範例

以下範例要求 GetVersionInfo 取得 FileVersionInfo 記事本。 接著它會把 印 FileBuildPart 在文字框裡。 此程式碼假設 textBox1 已被實例化。

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

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

備註

通常,版本號會顯示為「主要號.次要號.製造號.私人零件號」。 檔案版本號是一種 64 位元的數字,用來表示檔案的版本號如下:

此性質獲得第三組 16 位元。

適用於

另請參閱