FileVersionInfo.IsPatched Свойство

Определение

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

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

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

Значение в противном случае .

Примеры

В следующем примере вызовы 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 = "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

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