<ro***********@gmail.comwrote:
[...]That depends on your definition of "bypasses". Using the anoymous method
It worked! Thanks!
Perhaps using an anonymous method bypasses the 'take no parameters'
restriction?
doesn't remove the restriction; the anonymous method signature _does_ in
fact wind up taking no parameters.
But with an anonymous method, you can "capture" any variable accessible in
the method in which the anonymous method is declared. So rather than
passing the string to the delegate method, the "e" method argument winds
up captured and used within the anonymous method directly.
In that respect, the anonymous method does bypass the restriction, by
allowing you to get data into the anonymous method without passing it.
Pete