FileVersionInfo.IsPatched Eigenschap

Definitie

Hiermee wordt een waarde opgehaald die aangeeft of het bestand is gewijzigd en niet identiek is aan het oorspronkelijke verzendbestand van hetzelfde versienummer.

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

Waarde van eigenschap

true als het bestand is gepatcht; anders, false.

Voorbeelden

In het volgende voorbeeld wordt aanroepen GetVersionInfo om het FileVersionInfo voor Kladblok op te halen. Vervolgens wordt de status van de Booleaanse waarde IsPatched weergegeven in een tekstvak. Bij deze code wordt ervan uitgegaan dat textBox1 deze is geïnstantieerd.

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

Van toepassing op