SystemState.ComparisonValue Property

3/29/2010

The value to compare against

Namespace: Microsoft.WindowsMobile.Status
Assembly: Microsoft.WindowsMobile.Status (in microsoft.windowsmobile.status.dll)

Syntax

public override Object ComparisonValue { get; set; }
'Declaration
Public Overrides Property ComparisonValue As Object

Property Value

You must initialize ComparisonValue with either an integer or a string value. To initialize it with an enumeration value, you must cast the value as either (int) or (string).

Example

The following example shows how to enable the Changed event to be raised when the number of active tasks is greater than 3:

SystemState activeTasks = new SystemState(SystemProperty.TasksActive);

private void Form1_Load(object sender, EventArgs e)
{
    activeTasks.ComparisonType = StatusComparisonType.Greater;
    activeTasks.ComparisonValue = 3;
    activeTasks.Changed += new ChangeEventHandler(activeTasks_Changed);
}

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

SystemState Class
SystemState Members
Microsoft.WindowsMobile.Status Namespace