Bhuwan,
For me it is something like the overloading operator method in version 2005.
Something I never need however in my idea some want it because they cannot
make a program in a maintainable way but needs things that make their
programs "looks" more sophisticated. For others it has to be in VB.Net
because it is in C#.
Of course those things can be handy, but for me it makes only that I need
more time when I review a program of somebody else.
However just my thought,
Cor
For me, anonymous delegates have three purposes (and only one is a
good purpose).
1) Help create hard to debug and maintain code. It's sort of like
using a public field instead of a full fledged property. In the
initial release it makes things "short and sweet", but 4 months later
when you need to make a change, or reuse the function, or apply an
attribute, you must spend even more time finding and rewriting the
code to into a "proper" method.
2) Give the C# loving, VB hating people something to brag about. As
you surely know the common response to "VB can do anything C# can"
post is "Oh yeah, what about creating Anonymous Methods?" Sure we can
declare the method, but that seems to never be enough to the anti-VB
groups.
3) Limited debugging help. Often times we create a method to use
solely for debugging. Generally, these are used to check for the
existence of a problem and then deleted. In this case it's nice to
wrap everything in one method declaration instead of having multiple
methods we need to delete afterwards. After all, stranding a method
can lead to confusion during maintenance, since you probably won't
remember what the method was ever used for.
(Just some casual observations on the topic)
Thanks,
Seth Rowe