From the point of view of Software Engineering, you are right, delegates are very similar to functional interfaces because they are a prototype of a functional interface.
They can also be used in a variety of ways: instead of passing an entire class to the one that contains the method you need, you can only pass a delegate. This saves a lot of code and creates much more readable code.
In addition, with the advent of lambda expressions, they can now also be easily defined on the fly, which is a huge bonus. Although it is POSSIBLE to build classes on the fly in C #, this is really a huge pain in the butt.
Comparing the two is an interesting concept. Previously, I did not consider how similar the ideas from the use-case and the point of structuring the code are.
Rick Minerich Sep 18 '08 at 19:29 2008-09-18 19:29
source share