Share via


CompilationSection.Debug 属性

定义

获取或设置一个值,该值指定是要编译发布二进制文件还是调试二进制文件。

public:
 property bool Debug { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("debug", DefaultValue=false)]
public bool Debug { get; set; }
[<System.Configuration.ConfigurationProperty("debug", DefaultValue=false)>]
member this.Debug : bool with get, set
Public Property Debug As Boolean

属性值

如果编译时将使用二进制文件调试,则为 true;否则为 falsefalse 指定将使用发布二进制文件进行编译。 默认值为 false

属性

示例

下面的代码示例演示如何使用 Debug 属性。 此代码示例是为 CompilationSection 类提供的一个更大示例的一部分。

// Display Debug property.
Console.WriteLine("Debug: {0}",
  configSection.Debug);

// Set Debug property.
configSection.Debug = false;
' Display Debug property.
Console.WriteLine("Debug: {0}", _
 configSection.Debug)

' Set Debug property.
configSection.Debug = False

适用于