ファイルにデバッグ情報を格納するか、またはデバッグ機能を有効にしてファイルをコンパイルするかを指定する値を取得します。
Public ReadOnly Property IsDebug As Boolean
[C#]
public bool IsDebug {get;}
[C++]
public: __property bool get_IsDebug();
[JScript]
public function get IsDebug() : Boolean;
プロパティ値
ファイルにデバッグ情報を格納する場合、またはデバッグ機能を有効にしてコンパイルする場合は true 。それ以外の場合は false 。
使用例
GetVersionInfo を呼び出して、メモ帳の FileVersionInfo を取得する例を次に示します。次に、ブール値 IsDebug の状態をテキスト ボックスに出力します。このコードは、 textBox1
がインスタンス化されていることを前提にしています。
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
[C#]
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;
}
[C++]
private:
void GetIsDebug() {
// Get the file version for the notepad.
FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
// Print whether the file contains debugging information.
textBox1->Text = String::Format( S"File contains debugging information: {0}", __box(myFileVersionInfo->IsDebug));
}
[JScript]
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;
}
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
FileVersionInfo クラス | FileVersionInfo メンバ | System.Diagnostics 名前空間