Export (0) Print
Expand All

PerformanceCounter.ReadOnly Property

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)]
[MonitoringDescriptionAttribute("PC_ReadOnly")]
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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft