FileVersionInfo.IsPreRelease Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient une valeur qui spécifie si le fichier est une version de développement plutôt qu’un produit commercialisé.
public:
property bool IsPreRelease { bool get(); };
public bool IsPreRelease { get; }
member this.IsPreRelease : bool
Public ReadOnly Property IsPreRelease As Boolean
Valeur de propriété
true si le fichier est préversion ; sinon, false.
Exemples
L’exemple d’appel GetVersionInfo suivant permet d’obtenir le FileVersionInfo Bloc-notes. Ensuite, elle indique si cette version est une version préliminaire dans une zone de texte. Ce code suppose qu’il textBox1 a été instancié.
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