FileVersionInfo.IsDebug Eigenschap

Definitie

Hiermee wordt een waarde opgehaald die aangeeft of het bestand foutopsporingsgegevens bevat of wordt gecompileerd met functies voor foutopsporing ingeschakeld.

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

Waarde van eigenschap

true als het bestand foutopsporingsgegevens bevat of is gecompileerd met functies voor foutopsporing ingeschakeld; anders, false.

Voorbeelden

In het volgende voorbeeld wordt aanroepen GetVersionInfo om het FileVersionInfo voor Kladblok op te halen. Vervolgens wordt de status van de Booleaanse waarde IsDebug weergegeven in een tekstvak. Bij deze code wordt ervan uitgegaan dat textBox1 deze is geïnstantieerd.

private void GetIsDebug()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print whether the file contains debugging information.
    textBox1.Text = "File contains debugging information: " +
        myFileVersionInfo.IsDebug;
}
Private Sub GetIsDebug()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print whether the file contains debugging information.
    textBox1.Text = "File contains debugging information: " & myFileVersionInfo.IsDebug
End Sub

Opmerkingen

De FileVersionInfo eigenschappen zijn gebaseerd op versieresourcegegevens die zijn ingebouwd in het bestand. Versiebronnen zijn vaak ingebouwd in binaire bestanden zoals .exe of .dll bestanden; tekstbestanden hebben geen versieresourcegegevens.

Versieresources worden doorgaans opgegeven in een Win32-resourcebestand of in assemblykenmerken. De IsDebug eigenschap weerspiegelt de VS_FF_DEBUG vlagwaarde in het bestandsblok VS_FIXEDFILEINFO , dat is gebouwd op basis van de VERSIONINFO resource in een Win32-resourcebestand. Zie het platform-SDK-onderwerp About Resource Files en VERSIONINFO Resource de onderwerponderwerpen voor meer informatie over het opgeven van versieresources in een Win32-resourcebestand.

Van toepassing op