I am looking for feedback from the group. I would like to know where others out there
draw the line when it comes to using Anonymous Delegates.
Personally I like Anonymous Delegates, I think they can be
simple and elegant. But I only like to
use them if they are simple and easy to read.
Basically I tend to only like them in scenarios where one line (or so) of code
is needed. If the is more than one line
of code, i like to put that code into a concrete method.
Example One, Simple/Elegant:
Example Two, using a Concrete method:
Example Three, using an Anonymous Delegate:
Of the three examples above, I like the first and second, but I don't like the 3rd one. Personnaly I think this is too much and should not be used.
What is everyones thoughts?
04-11-2007 7:54 AM