다음을 통해 공유


SPSystemPerformanceCounterMonitor.LastValue Property

Gets a snapshot of the last value read from the underlying counter.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Overrides ReadOnly Property LastValue As Object
    Get
'Usage
Dim instance As SPSystemPerformanceCounterMonitor
Dim value As Object

value = instance.LastValue
public override Object LastValue { get; }

Property Value

Type: System.Object
The most recently read value of the counter that the monitor is watching.

Remarks

Every time the Value property is read, LastValue is (re)set to the same value. Successive readings of the LastValue property, if no reading of Value occurs in between, always return the same value. When your code needs to retrieve the same returned value of the counter a second time, get the LastValue property for the second and all subsequent uses of the same value.

If the monitoring infrastructure SharePoint Foundation was unable to read the underlying counter the last time that the LastValue property was read, LastValue has the value 0.0f.

See Also

Reference

SPSystemPerformanceCounterMonitor Class

SPSystemPerformanceCounterMonitor Members

Microsoft.SharePoint.Utilities Namespace