Timeline for answer to When & why to use delegates? by Dave
Current License: CC BY-SA 4.0
Post Revisions
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Jul 31, 2019 at 11:56 | history | suggested | Hoshani | CC BY-SA 4.0 |
improved comments from lengthy one line to multiple lines to make it easier for reading
|
| Jul 31, 2019 at 11:17 | review | Suggested edits | |||
| S Jul 31, 2019 at 11:56 | |||||
| Dec 14, 2018 at 10:27 | history | edited | msysmilu | CC BY-SA 4.0 |
typo corrected notifyDelegateWithMessage
|
| Feb 6, 2015 at 15:43 | comment | added | PersyJack | Dave, thank you, I was just confused about the difference between passing a delegate vs calling a static method, but your explanation and this article made it clear. | |
| Feb 6, 2015 at 15:39 | comment | added | Dave |
@PersyJack When you pass a delegate as a parameter then your method trusts that a suitable delegate is passed and your method has no understanding of the delegate's value/logic- it is decoupled. My Start method has no idea of anything other than what is passed to it. If I added a static method, then my Start method has to know about this static class and the method! I could also pass a delegate which actually doesn't pass NotifyIfComplete but passes my EmailCustomer or SaveToDatabase function.
|
|
| Feb 6, 2015 at 15:21 | comment | added | PersyJack | Dave, in your example, what is the difference, if any, between using a delegate vs making NotifyIfComplete internal/public and call Program.NotifyIfComplete directly, since NotifyIfComplete is a static method? | |
| Feb 22, 2013 at 8:23 | history | edited | Dave | CC BY-SA 3.0 |
deleted 228 characters in body
|
| Feb 21, 2013 at 12:34 | history | edited | Dave | CC BY-SA 3.0 |
added 1836 characters in body
|
| Feb 21, 2013 at 12:26 | history | edited | Dave | CC BY-SA 3.0 |
added 1575 characters in body
|
| Feb 21, 2013 at 12:20 | history | edited | Dave | CC BY-SA 3.0 |
added 1575 characters in body
|
| Feb 21, 2013 at 12:14 | history | edited | Dave | CC BY-SA 3.0 |
deleted 57 characters in body
|
| S Feb 21, 2013 at 12:02 | history | answered | Dave | CC BY-SA 3.0 | |
| S Feb 21, 2013 at 12:02 | history | made wiki | Post Made Community Wiki by Dave |