Bagikan melalui


FileVersionInfo.IsPreRelease Properti

Definisi

Mendapatkan nilai yang menentukan apakah file adalah versi pengembangan, bukan produk yang dirilis secara komersial.

public:
 property bool IsPreRelease { bool get(); };
public bool IsPreRelease { get; }
member this.IsPreRelease : bool
Public ReadOnly Property IsPreRelease As Boolean

Nilai Properti

true jika file prarilis; jika tidak, false.

Contoh

Contoh berikut memanggil GetVersionInfo untuk mendapatkan FileVersionInfo untuk Notepad. Kemudian menampilkan apakah versi ini adalah versi prarilis dalam kotak teks. Kode ini mengasumsikan textBox1 telah dibuat.

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

        // Print whether the file is a prerelease version.
        textBox1->Text = String::Concat( "File is prerelease version ", myFileVersionInfo->IsPreRelease );
    }
 private void GetIsPreRelease()
 {
     // Get the file version for the notepad.
     FileVersionInfo myFileVersionInfo =
         FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

     // Print whether the file is a prerelease version.
     textBox1.Text = "File is prerelease version " + myFileVersionInfo.IsPreRelease;
}
Private Sub GetIsPreRelease()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print whether the file is a prerelease version.
    textBox1.Text = "File is prerelease version " & myFileVersionInfo.IsPreRelease
End Sub

Berlaku untuk