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

適用対象