When I add the textBox.TextChanged to watch list I get a message saying
The event 'System.Windows.Forms.Control.TextChanged' can only appear on the left hand side of += or -=
Is there any way to check what event's are called on text change?
-
In the debugger, open up the control and find whichever private variable contains the EventHandlerList. Then find the event add/remove code for
TextChangedso see which key is used - and examine the event handler list's entry for that key.It's painful, but it should work.
Marc Gravell : For info, the key is `EventTextChanged`From Jon Skeet -
Not really; events are, by design, a closed box. There are hacky ways of getting at it, but they all require incestuous knowledge of the implementation (be it a field-like event, or an EventHandlerList, etc).
Why do you need this?
One other approach might be to get the TextBox pdb from the MS symbol server so you can add a breakpoint (to
OnTextChanged) and step through the TextBox code, and step into the delegate invoke... again, not ideal.From Marc Gravell
0 comments:
Post a Comment