If I understand you correctly, you should be able to do something like this:
public Boolean PropertyA {
get {
return(_PropertyA);
}
set {
_PropertyA = value;
_PropertyB = !_PropertyA;
}
}
Using essentially the same property definition for ProperyB, if PropertyA is set to "True", ProperyB will be set to "False". If PropertyA is set to "False", PropertyB will be set to "True".
This may not be exactly what you are looking for, but the key is to use the "set" property definition to alter the value of the other variable.
What you don't know can hurt you!
|