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,会出现此信息。

适用于

另请参阅