Bagikan melalui


FileVersionInfo.PrivateBuild Properti

Definisi

Mendapatkan informasi tentang versi privat file.

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

Nilai Properti

Informasi tentang versi privat file atau null jika file tidak berisi informasi versi.

Contoh

Contoh berikut memanggil GetVersionInfo untuk mendapatkan FileVersionInfo untuk Notepad. Kemudian mencetak informasi build privat dalam kotak teks. Kode ini mengasumsikan textBox1 telah dibuat.

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

Keterangan

Informasi ini ada ketika IsPrivateBuild adalah true.

Berlaku untuk

Lihat juga