AppDomain.MonitoringIsEnabled AppDomain.MonitoringIsEnabled AppDomain.MonitoringIsEnabled AppDomain.MonitoringIsEnabled Property


Gets or sets a value that indicates whether CPU and memory monitoring of application domains is enabled for the current process. Once monitoring is enabled for a process, it cannot be disabled.

 static property bool MonitoringIsEnabled { bool get(); void set(bool value); };
[get: System.Security.SecurityCritical]
[set: System.Security.SecurityCritical]
public static bool MonitoringIsEnabled { get; set; }
member this.MonitoringIsEnabled : bool with get, set
Public Shared Property MonitoringIsEnabled As Boolean

Property Value

true if monitoring is enabled; otherwise false.


The current process attempted to assign the value false to this property.


This static property (Shared property in Visual Basic) controls CPU and memory monitoring of all the application domains in the process.

If you attempt to set this property to false, a ArgumentException exception is thrown, even if the current value of the property is false.

Once monitoring is enabled, you can use the MonitoringSurvivedMemorySize, MonitoringSurvivedProcessMemorySize, MonitoringTotalAllocatedMemorySize, and MonitoringTotalProcessorTime instance properties to monitor CPU and memory use of individual application domains.


Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Applies to

See also