[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
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.
Namespace:
System
Assembly:
mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
Public Shared Property MonitoringIsEnabled As Boolean
Get
Set
Dim value As Boolean
value = AppDomain.MonitoringIsEnabled
AppDomain.MonitoringIsEnabled = value
public static bool MonitoringIsEnabled { get; set; }
public:
static property bool MonitoringIsEnabled {
bool get ();
void set (bool value);
}
static member MonitoringIsEnabled : bool with get, set
| Exception | Condition |
|---|
| ArgumentException | 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.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 4
.NET Framework Client Profile
Supported in: 4
Reference