Freigeben über


FileVersionInfo.IsPatched-Eigenschaft

Ruft einen Wert ab, der angibt, ob die Datei geändert wurde und von der Originaldatei mit derselben Versionsnummer abweicht.

Namespace: System.Diagnostics
Assembly: System (in system.dll)

Syntax

'Declaration
Public ReadOnly Property IsPatched As Boolean
'Usage
Dim instance As FileVersionInfo
Dim value As Boolean

value = instance.IsPatched
public bool IsPatched { get; }
public:
property bool IsPatched {
    bool get ();
}
/** @property */
public boolean get_IsPatched ()
public function get IsPatched () : boolean

Eigenschaftenwert

true, wenn die Datei geändert wurde, andernfalls false.

Beispiel

Im folgenden Beispiel wird GetVersionInfo aufgerufen, um FileVersionInfo für den Editor abzurufen. Der Zustand des booleschen IsPatched wird dann in einem Textfeld angezeigt. Bei diesem Code wird davon ausgegangen, dass textBox1 instanziiert wurde.

Private Sub GetIsPatched()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " & myFileVersionInfo.IsPatched
End Sub 'GetIsPatched
private void GetIsPatched() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " + myFileVersionInfo.IsPatched;
 }
    
private:
   void GetIsPatched()
   {
      // Get the file version for the notepad.
      FileVersionInfo^ myFileVersionInfo = FileVersionInfo::GetVersionInfo( "%systemroot%\\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("%systemroot%\\Notepad.exe");

    // Print whether the file has a patch installed.
    textBox1.set_Text("File has patch installed: " 
        + myFileVersionInfo.get_IsPatched());
} //GetIsPatched
private function GetIsPatched() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " + myFileVersionInfo.IsPatched;
 }
    

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

FileVersionInfo-Klasse
FileVersionInfo-Member
System.Diagnostics-Namespace