FileVersionInfo.IsPatched Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob die Datei geändert wurde und von der Originaldatei mit derselben Versionsnummer abweicht.

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

Eigenschaftswert

Boolean

true, wenn die Datei geändert wurde, andernfalls false.

Beispiele

Im folgenden Beispiel wird GetVersionInfo aufgerufen, um die FileVersionInfo Editor abzurufen. Anschließend wird der Zustand des Boolean IsPatched in einem Textfeld angezeigt. Dieser Code wird davon ausgegangen textBox1 , dass es 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 = String::Concat( "File has patch installed: ", myFileVersionInfo->IsPatched );
    }
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