What's the use of delegates in c#? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What's the use of delegates in c#?

Delegate is reference type of variable that holds the reference to a method.The reference can be changed at runtime

29th Nov 2016, 10:44 AM
Sai Ram
Sai Ram - avatar
6 Answers
+ 20
This page is very informative, you can read about delegates here https://msdn.microsoft.com/en-us/library/ms173171.aspx
30th Nov 2016, 7:17 AM
Remmae - avatar
Delegates like a function pointer Delgates hold reference of method. It change run time
30th Nov 2016, 9:06 AM
Sonu Baghel
Sonu Baghel - avatar
forever alone
7th Dec 2016, 8:55 PM
Alban Sadiki
Alban Sadiki - avatar
15th Dec 2016, 3:59 AM
For general understanding of delegates, this guy's series on them was very helpful for me. https://youtu.be/G5R4C8BLEOc
15th Dec 2016, 6:37 AM
Matt Scott
Matt Scott - avatar
Delegate is the reference to different object or which holds reference in class of the other object
22nd Dec 2016, 6:28 PM
Shankar Sutar
Shankar Sutar - avatar