共用方式為


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 = String::Concat( "Private build number: ", myFileVersionInfo->PrivateBuild );
    }
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

備註

當 為 trueIsPrivateBuild,會出現這項資訊。

適用於

另請參閱