There is nothing which can "work" here. You don't show any code which calls your method
OnValueChanged
, that's the problem; you just formally defined this method, now what?
You simply don't understand how events work and what they are used for. I could explain, but better just read about it:
http://msdn.microsoft.com/en-us/library/awbftdfh.aspx[
^].
Helping with your particular problem is useless before your 1) learn the above material; in might require to learn the prerequisites required for understanding of this topic; 2) if you still don't know how to define and use events by that time, describe required functionality. In particular, if the event is called "ValueChanged", at least you should have the property
Value
; and the testing code should try to modify the value of this property ("Change" it, right?), and that should invoke the event. The problem is not the names of properties or events; I'm just trying to give you a hint.
—SA