FileVersionInfo.IsPatched Propiedad

Definición

Obtiene un valor que especifica si el archivo se ha modificado y no es idéntico al archivo suministrado originalmente con el mismo número de versión.Gets a value that specifies whether the file has been modified and is not identical to the original shipping file of the same version number.

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

Valor de propiedad

Boolean

true si el archivo está modificado; en caso contrario, false.true if the file is patched; otherwise, false.

Ejemplos

En el ejemplo siguiente se llama a GetVersionInfo para obtener el FileVersionInfo para el Bloc de notas.The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. A continuación, muestra el estado de los IsPatched booleanos en un cuadro de texto.Then it displays the state of the Boolean IsPatched in a text box. Este código supone que se ha creado una instancia de textBox1.This code assumes textBox1 has been instantiated.

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

Se aplica a