Click here to Skip to main content
12,820,857 members (28,757 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

291.5K views
156 bookmarked
Posted 7 Apr 2010

C# - Delegates 101 - A Practical Example

, 11 Apr 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
A practical example not too simple, not too complex, to explain delegates
 

License

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

Share

About the Author

Erwin@Attentia
Web Developer
Belgium Belgium
I'm a self-made developer. And after years of writing code, I think I don't suck at everything ! When I stumble on a problem, I can't help but to figure it out. In some cases, I even write an article about it !
Also, in my quest to write better code, I have obtained a certificate as UML Professional, and I'm also a Certified ScrumMaster.

You may also be interested in...

Pro

Comments and Discussions

 
QuestionOne question remains....when and why? Pin
linnx8812-Oct-12 8:06
memberlinnx8812-Oct-12 8:06 
AnswerRe: One question remains....when and why? Pin
Erwin@ODS12-Oct-12 8:56
memberErwin@ODS12-Oct-12 8:56 
GeneralMy vote of 5 Pin
Gianmaria Gregori5-Oct-12 12:03
memberGianmaria Gregori5-Oct-12 12:03 
GeneralRe: My vote of 5 Pin
Erwin@ODS5-Oct-12 14:00
memberErwin@ODS5-Oct-12 14:00 
GeneralMy vote of 3 Pin
kiransolkar1-Oct-12 0:38
memberkiransolkar1-Oct-12 0:38 
GeneralRe: My vote of 3 Pin
Erwin@ODS1-Oct-12 1:30
memberErwin@ODS1-Oct-12 1:30 
GeneralThak you ! Pin
Member 94163469-Sep-12 2:06
memberMember 94163469-Sep-12 2:06 
GeneralRe: Thak you ! Pin
Erwin@ODS9-Sep-12 4:05
memberErwin@ODS9-Sep-12 4:05 
I'm glad the example helped you to understand delegates better. But please remember that this is only 1 way of using delegates. Events are another, lambda expressions yet another. So keep on studying !
QuestionRate of 5 Pin
rskuchimanchi24-Aug-12 11:34
memberrskuchimanchi24-Aug-12 11:34 
AnswerRe: Rate of 5 Pin
Erwin@ODS24-Aug-12 11:51
memberErwin@ODS24-Aug-12 11:51 
GeneralMy vote of 5 Pin
rakfali14-Jul-12 11:39
memberrakfali14-Jul-12 11:39 
GeneralRe: My vote of 5 Pin
Erwin@ODS14-Jul-12 23:09
memberErwin@ODS14-Jul-12 23:09 
GeneralMy vote of 3 Pin
chaithu64830-Mar-12 4:06
memberchaithu64830-Mar-12 4:06 
GeneralRe: My vote of 3 Pin
Erwin@ODS31-Mar-12 0:00
memberErwin@ODS31-Mar-12 0:00 
GeneralMy vote of 5 Pin
Smik Lakhani2-Mar-12 5:06
memberSmik Lakhani2-Mar-12 5:06 
GeneralRe: My vote of 5 Pin
Erwin@ODS5-Mar-12 1:33
memberErwin@ODS5-Mar-12 1:33 
GeneralGood One !! Pin
Shrilata Ellaboina11-Jan-12 8:34
memberShrilata Ellaboina11-Jan-12 8:34 
GeneralRe: Good One !! Pin
Erwin@ODS11-Jan-12 10:15
memberErwin@ODS11-Jan-12 10:15 
GeneralMy vote of 5 Pin
Mikael Katajamaki29-Dec-11 12:35
memberMikael Katajamaki29-Dec-11 12:35 
GeneralRe: My vote of 5 Pin
Erwin@ODS1-Jan-12 22:20
memberErwin@ODS1-Jan-12 22:20 
GeneralMy vote of 5 Pin
Kailash_Singh2-Nov-11 2:45
memberKailash_Singh2-Nov-11 2:45 
GeneralRe: My vote of 5 Pin
Erwin@ODS7-Nov-11 10:18
memberErwin@ODS7-Nov-11 10:18 
GeneralMy vote of 5 Pin
Fedor Steeman16-Oct-11 22:48
memberFedor Steeman16-Oct-11 22:48 
GeneralRe: My vote of 5 Pin
Erwin@ODS7-Nov-11 10:17
memberErwin@ODS7-Nov-11 10:17 
GeneralMy vote of 5 Pin
GPUToaster22-Aug-11 22:09
memberGPUToaster22-Aug-11 22:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170308.1 | Last Updated 11 Apr 2010
Article Copyright 2010 by Erwin@Attentia
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid