TraceSection.Enabled Propriedade

Definição

Obtém ou define um valor que indica se o serviço de rastreamento do ASP.NET está habilitado.Gets or sets a value indicating whether the ASP.NET trace service is enabled.

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

Valor da propriedade

Boolean

true Se o rastreamento estiver habilitado; caso contrário, false .true if trace is enabled; otherwise, false. O padrão é true.The default is true.

Atributos

Exemplos

O exemplo de código a seguir mostra como usar a Enabled propriedade.The following code example shows how to use the Enabled property. Este exemplo de código faz parte de um exemplo maior fornecido para a TraceSection classe.This code example is part of a larger example provided for the TraceSection class.


// Get the current Enabled property value.
Boolean enabledValue = traceSection.Enabled;

// Set the Enabled property to false.
traceSection.Enabled = false;


' Get the current Enabled property value.
Dim enabledValue As Boolean = traceSection.Enabled

' Set the Enabled property to false.
traceSection.Enabled = False

Aplica-se a