語言

FileVersionInfo.PrivateBuild 屬性

定義

取得檔案私密版本的資訊。

public:
 property System::String ^ PrivateBuild { System::String ^ get(); };
public string? PrivateBuild { get; }
public string PrivateBuild { get; }
member this.PrivateBuild : string
Public ReadOnly Property PrivateBuild As String

屬性值

關於檔案的私有版本資訊,或 null 檔案是否包含版本資訊。

範例

以下範例要求 GetVersionInfo 取得 FileVersionInfo 記事本。 然後它會把私有建築資訊印在文字框裡。 此程式碼假設 textBox1 已被實例化。

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

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

備註

當 IsPrivateBuild 是 時 true,這個資訊就存在。

適用於

另請參閱