FileVersionInfo.IsPatched Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Property Value
true
if the file is patched; otherwise, false
.
Examples
The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it displays the state of the Boolean IsPatched in a text box. 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
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.