संपादित करें

इसके माध्यम से साझा किया गया


FileVersionInfo.IsDebug Property

Definition

Gets a value that specifies whether the file contains debugging information or is compiled with debugging features enabled.

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

Property Value

true if the file contains debugging information or is compiled with debugging features enabled; otherwise, false.

Examples

The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it displays the state of the Boolean IsDebug in a text box. This code assumes textBox1 has been instantiated.

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 = String::Concat( "File contains debugging information: ",
            myFileVersionInfo->IsDebug );
    }
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

Remarks

The FileVersionInfo properties are based on version resource information built into the file. Version resources are often built into binary files such as .exe or .dll files; text files do not have version resource information.

Version resources are typically specified in a Win32 resource file, or in assembly attributes. The IsDebug property reflects the VS_FF_DEBUG flag value in the file's VS_FIXEDFILEINFO block, which is built from the VERSIONINFO resource in a Win32 resource file. For more information about specifying version resources in a Win32 resource file, see the Platform SDK About Resource Files topic and VERSIONINFO Resource topic topics.

Applies to