FileVersionInfo.IsPatched Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob die Datei geändert wurde und nicht mit der ursprünglichen Versanddatei derselben Versionsnummer identisch ist.

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

Eigenschaftswert

truewenn die Datei gepatcht ist; andernfalls . false

Beispiele

Im folgenden Beispiel wird aufgerufen GetVersionInfo , um das FileVersionInfo Editor-Steuerelement abzurufen. Anschließend wird der Status des Booleschen Werts IsPatched in einem Textfeld angezeigt. Dieser Code setzt voraus, dass textBox1 instanziiert wurde.

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

Gilt für: