RegistryState.ComparisonValue Property
3/29/2010
Gets or sets the comparison value.
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
Remarks
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 "MyValue" under "HKEY_LOCAL_MACHINE\\MyKey" changes and is greater than 50:
RegistryState myState = new RegistryState("HKEY_LOCAL_MACHINE\\MyKey", "MyValue");
private void Form1_Load(object sender, EventArgs e)
{
myState.ComparisonType = StatusComparisonType.Greater;
myState.ComparisonValue = 50;
myState.Changed += new ChangeEventHandler(myState_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
RegistryState Class
RegistryState Members
Microsoft.WindowsMobile.Status Namespace