FileVersionInfo.IsPatched Propriété

Définition

Obtient une valeur qui spécifie si le fichier a été modifié et n’est pas identique au fichier d’expédition d’origine du même numéro de version.

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

Valeur de propriété

true si le fichier est corrigé ; sinon, false.

Exemples

L’exemple d’appel GetVersionInfo suivant permet d’obtenir le FileVersionInfo Bloc-notes. Ensuite, il affiche l’état du booléen IsPatched dans une zone de texte. Ce code suppose qu’il textBox1 a été instancié.

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

    // Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " + myFileVersionInfo.IsPatched;
}
Private Sub GetIsPatched()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " & myFileVersionInfo.IsPatched
End Sub

S’applique à