Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft einen Wert ab, der angibt, ob die Datei Debuginformationen enthält oder mit aktivierten Debugfeatures kompiliert wurde.
Namespace: System.Diagnostics
Assembly: System (in system.dll)
Syntax
'Declaration
Public ReadOnly Property IsDebug As Boolean
'Usage
Dim instance As FileVersionInfo
Dim value As Boolean
value = instance.IsDebug
public bool IsDebug { get; }
public:
property bool IsDebug {
bool get ();
}
/** @property */
public boolean get_IsDebug ()
public function get IsDebug () : boolean
Eigenschaftenwert
true, wenn die Datei Debuginformationen enthält oder mit aktivierten Debugfeatures kompiliert wurde, andernfalls false.
Hinweise
Die FileVersionInfo-Eigenschaften beruhen auf Versionsressourceninformationen, die in die Datei integriert sind. Versionsressourcen sind häufig in Binärdateien, z. B. EXE- oder DLL-Dateien, integriert. Textdateien enthalten keine Versionsressourceninformationen.
Versionsressourcen werden i. d. R. in einer Win32-Ressourcendatei oder in Assemblyattributen angegeben. Die IsDebug-Eigenschaft gibt den VS_FF_DEBUG-Flagwert im VS_FIXEDFILEINFO-Block der Datei wieder, der anhand der VERSIONINFO-Ressource in einer Win32-Ressourcendatei erstellt wird. Weitere Informationen über das Angeben von Versionsressourcen in einer Win32-Ressourcendatei finden Sie in den Platform SDK-Themen About Resource Files und VERSIONINFO Resource.
Beispiel
Im folgenden Beispiel wird GetVersionInfo aufgerufen, um FileVersionInfo für den Editor abzurufen. Der Zustand des booleschen IsDebug wird dann in einem Textfeld angezeigt. Bei diesem Code wird davon ausgegangen, dass textBox1 instanziiert wurde.
Private Sub GetIsDebug()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
' Print whether the file contains debugging information.
textBox1.Text = "File contains debugging information: " & myFileVersionInfo.IsDebug
End Sub 'GetIsDebug
private void GetIsDebug() {
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
// Print whether the file contains debugging information.
textBox1.Text = "File contains debugging information: " +
myFileVersionInfo.IsDebug;
}
private:
void GetIsDebug()
{
// Get the file version for the notepad.
FileVersionInfo^ myFileVersionInfo = FileVersionInfo::GetVersionInfo( "%systemroot%\\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("%systemroot%\\Notepad.exe");
// Print whether the file contains debugging information.
textBox1.set_Text("File contains debugging information: "
+ myFileVersionInfo.get_IsDebug());
} //GetIsDebug
private function GetIsDebug() {
//Get the file version for the notepad.
var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
//Print whether the file contains debugging information.
textBox1.Text = "File contains debugging information: " +
myFileVersionInfo.IsDebug;
}
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