C# Delegates

Delegates offer a great deal of power to the C# and they fundamentally alter the way C# works compared to Java. I came across an article about delegates in C# from one of the MSDN blogs.

Here is the link

The link has the code where you can simply understand just by reading scanning the code.

The funny part is the author has mentioned that if you still want to execute a delegate in a asynchronous way and still need more control on that, then try executing the delegate from a thread. It’s true. But I can’t imagine a situation why we call delegate as a new thread, rather we can simply use the new thread for the work.

But if you think a little more you can really understand that, author has a good point in that, which really explains and clears the confusion most of the people have on delegates, which is whether the delegates are synchronous or asynchronous.

Delegates can be called either synchronously or asynchronously.

Advertisements

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: