PerformanceCounter.ReadOnly Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value indicating whether this PerformanceCounter instance is in read-only mode.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

[BrowsableAttribute(false)]
public bool ReadOnly { get; set; }

Property Value

Type: System.Boolean

true, if the PerformanceCounter instance is in read-only mode (even if the counter itself is a custom .NET Framework counter); false if it is in read/write mode. The default is the value set by the constructor.

For a system counter, ReadOnly should always true. You cannot write to a system counter.

.NET Framework
Available since 1.1
Return to top
Show: