On 2/3/07, Paul <[EMAIL PROTECTED]> wrote: > Hi, > > I've googled for this for a while now, but can't seem to find a way to > do it. > > I'm trying to pass more than one argument on a line like > > this.foo.TextChanged += new System.EventHandler(this.foo_TextChanged, > arg2); > > where arg2 can be just about anything. Any hints would be appreciated.
Doing exactly what you describe is not possible. If you explain what your goal is, then we might be able to suggest ways to achieve it. When signing up for an event, all you are doing is adding a method (that has the exact signature of a particular delegate -- in this case, System.EventHandler) to a list of methods that will be called when the event is fired. So all you can do is add and remove methods from the event, and the methods MUST have the right signature. What do you want to do with arg2? I am sure there is a way to get foo_TextChanged to be aware of it. Best, Sandy _______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
