Skip to main content
edited title
Link
Mehdi Dehghani
  • 11.7k
  • 6
  • 65
  • 68

when When & why to use delegates?

deleted 1 character in body
Source Link
Ondrej Slinták
  • 32.1k
  • 21
  • 97
  • 127

I'm relatively new in C#, & I'm wondering when to use Delegates appropriately. they are widely used in events declaration  , but when should I use them in my own code and why are they useful? why not to use something else?

I'm also wondering when I have to use delegates and I have no other alternative.

Thank you for the help!

EDIT: I think I've found a necessary use of Delegates here

I'm relatively new in C#, & I'm wondering when to use Delegates appropriately. they are widely used in events declaration  , but when should I use them in my own code and why are they useful? why not to use something else?

I'm also wondering when I have to use delegates and I have no other alternative.

Thank you for the help!

EDIT: I think I've found a necessary use of Delegates here

I'm relatively new in C#, & I'm wondering when to use Delegates appropriately. they are widely used in events declaration, but when should I use them in my own code and why are they useful? why not to use something else?

I'm also wondering when I have to use delegates and I have no other alternative.

Thank you for the help!

EDIT: I think I've found a necessary use of Delegates here

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I'm relatively new in C#, & I'm wondering when to use Delegates appropriately. they are widely used in events declaration , but when should I use them in my own code and why are they useful? why not to use something else?

I'm also wondering when I have to use delegates and I have no other alternative.

Thank you for the help!

EDIT: I think I've found a necessary use of Delegates herehere

I'm relatively new in C#, & I'm wondering when to use Delegates appropriately. they are widely used in events declaration , but when should I use them in my own code and why are they useful? why not to use something else?

I'm also wondering when I have to use delegates and I have no other alternative.

Thank you for the help!

EDIT: I think I've found a necessary use of Delegates here

I'm relatively new in C#, & I'm wondering when to use Delegates appropriately. they are widely used in events declaration , but when should I use them in my own code and why are they useful? why not to use something else?

I'm also wondering when I have to use delegates and I have no other alternative.

Thank you for the help!

EDIT: I think I've found a necessary use of Delegates here

corrected typos
Source Link
meJustAndrew
  • 6.8k
  • 11
  • 58
  • 89
Loading
Post Closed as "exact duplicate" by nawfal, George Duckett, Linus Caldwell, Freelancer, default
improved formattig, proposed answer
Source Link
iChaib
  • 477
  • 4
  • 10
  • 17
Loading
Post Made Community Wiki
Source Link
iChaib
  • 477
  • 4
  • 10
  • 17
Loading