.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Delegates usage

Posted By: sankar     Posted Date: September 06, 2008    Points:2   Category :C#
As per my knowledge, Delegate is a pointer to a function.

I have some questions on delegate please any one can help me..........

1) Why would I use a delegate?
2) Can anyone provide a real-world example of when I should use a delegate?
3) An example of a task that can't be done without the use of a delegate?
4) The relationship between Delegates and Events?
5)Is there any alternative to delegates.

I read some of the books but i didn't get what is the exact usage of delegates.

please give me some of the real world scenarios to use delegates.

giving in depth knowledge helps me a lot........................

thanks to all in advance.


Author: Amit Mehra             
Posted Date: September 07, 2008     Points: 5   

you should use a delegate when:

a)An eventing design pattern is used.

b)It is desirable to encapsulate a static method.

c)The caller has no need access other properties, methods, or interfaces on the object implementing the method.

d)Easy composition is desired.

e)A class may need more than one implementation of the method.

Please "Mark As Answer " if this post help you.
Author: DPK             
Posted Date: September 11, 2008     Points: 5   

can u give more detail pls?

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend