FileVersionInfo.IsPatched Proprietà

Definizione

Ottiene un valore che specifica se il file è stato modificato e non è identico al file di spedizione originale dello stesso numero di versione.

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

Valore della proprietà

true se il file è patchato; in caso contrario, false.

Esempio

Nell'esempio seguente viene chiamato GetVersionInfo per ottenere per FileVersionInfo il Blocco note. Visualizza quindi lo stato del valore booleano IsPatched in una casella di testo. Questo codice presuppone textBox1 che sia stata creata un'istanza di .

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

Si applica a