SystemState.ComparisonType Property

3/29/2010

Type of comparison operation to perform if you want your event to be raised only under a specific condition

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

Syntax

public override StatusComparisonType ComparisonType { get; set; }
'Declaration
Public Overrides Property ComparisonType As StatusComparisonType

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