FileVersionInfo.IsPatched Свойство

Определение

Получает значение, указывающее, был ли файл изменен и не совпадает ли он с исходным файлом той же версии.

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

Значение свойства

Значение true, если файл исправлен; в противном случае — значение false.

Примеры

В следующем примере вызывается GetVersionInfo для получения FileVersionInfo для Блокнота. Затем отображается состояние логического IsPatched значения в текстовом поле. В этом коде предполагается textBox1 , что был создан экземпляр .

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

Применяется к