Bagikan melalui


FileVersionInfo.IsPatched Properti

Definisi

Mendapatkan nilai yang menentukan apakah file telah dimodifikasi dan tidak identik dengan file pengiriman asli dari nomor versi yang sama.

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

Nilai Properti

true jika file di-patch; jika tidak, false.

Contoh

Contoh berikut memanggil GetVersionInfo untuk mendapatkan FileVersionInfo untuk Notepad. Kemudian menampilkan status Boolean IsPatched dalam kotak teks. Kode ini mengasumsikan textBox1 telah dibuat.

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

Berlaku untuk