I am using standard windows forms controls under C#.
Short version: is there any problem unhooking a delegate which hasn't been hooked?
Full question:
I have two controls which are different ways of setting a single value. Thus when one is changed, the changed event handler computes a value for the other and sets it. So I need to unhook the change event on the second control temporarily to prevent looping (A changes B, B is changed so it changes A, A is changed...). There are also some other situations where I need to stop the change event. So there are several places where I need to unhook the event, and only one place where it needs to be hooked.
My question is: do I need to keep track of whether the event has been hooked or can I just unhook it as many times as I like and only occasionally hook it again? (Is there any documentation that addresses this?)