FileVersionInfo.IsPreRelease Właściwość

Definicja

Pobiera wartość określającą, czy plik jest wersją programową, a nie produktem wydanym komercyjnie.

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

Wartość właściwości

true jeśli plik jest w wersji wstępnej; w przeciwnym razie , false.

Przykłady

Poniższe przykładowe wywołania GetVersionInfo w celu pobrania FileVersionInfo notatnika. Następnie wyświetla, czy ta wersja jest wersją wstępną w polu tekstowym. W tym kodzie założono, że textBox1 wystąpienie zostało utworzone.

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

Dotyczy