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 = "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

適用対象