Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
first of all sorry for my English .

i know what is a delegate and a code for delegate

but i don't know why use a delegate
if call function why use a delegate don't use a name of function


thnx for any help ;
Posted
Comments
Toli Cuturicu 11-Dec-10 7:54am    
I know why I use a delegate.
I can't know why YOU use it.

See here[^].
 
Share this answer
 
you should navigate the given link
Delegates in C#[^]
:)
 
Share this answer
 
 
Share this answer
 
It can be used to encapsulate a reference to a method inside a delegate object.

The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.
 
Share this answer
 
delegates are just function pointers that hod reference to functions for this they have same number of parameters and same return type. The are used primarily to expose functionality since there is only one entry point in the function.
see below
http://msdn.microsoft.com/en-us/library/aa288459%28v=vs.71%29.aspx
 
Share this answer
 
v2
Comments
fjdiewornncalwe 12-Jan-13 10:28am    
Please don't reopen old questions like this one, especially when it has answers selected as correct. Before answering a question, please review the Posted date on the question and check if answers exist and if they are valid.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900