C#
-
why delegates are used in c#
-
why delegates are used in c#
Because we can. Because they are usefull. Because they are function-pointers-on-steroids. Because some things won;t work without them (or something very like them). Google could tell you a lot more: it found this very quickly. 6 important uses of Delegates and Events[^] In future, please do at least basic research, and not waste your time or ours.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
why delegates are used in c#
They give .NET programmers a way to create a strongly-typed template for a type-safe function pointer for uses like: a. passing a block of executable code as a parameter to a method b. enabling late-bound evaluation c. they are foundation of the multi-cast Event facility in .NET d. they enable the easy implementation of callback methods from one object to another across namespace/scope boundaries Many people have found value in author Jesse Liberty's explanation of Delegates: [^].
« There is only one difference between a madman and me. The madman thinks he is sane. I know I am mad. » Salvador Dali
-
Because we can. Because they are usefull. Because they are function-pointers-on-steroids. Because some things won;t work without them (or something very like them). Google could tell you a lot more: it found this very quickly. 6 important uses of Delegates and Events[^] In future, please do at least basic research, and not waste your time or ours.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
This is the OP's first post on CP.
« There is only one difference between a madman and me. The madman thinks he is sane. I know I am mad. » Salvador Dali
-
This is the OP's first post on CP.
« There is only one difference between a madman and me. The madman thinks he is sane. I know I am mad. » Salvador Dali
I was fresh out of bed, and hadn't finished my first :java: :-O
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
Because we can. Because they are usefull. Because they are function-pointers-on-steroids. Because some things won;t work without them (or something very like them). Google could tell you a lot more: it found this very quickly. 6 important uses of Delegates and Events[^] In future, please do at least basic research, and not waste your time or ours.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
Sorry, dude, but I think you are over reacting a touch. He asked a perfectly valid question, which might not be up to your high standards, but valid none the less. Just ignore the question if you feel the OP hasn't "Done Enough". Take a look at Bill's answer to the same question, and you can see a huge difference between attitudes.
Everyone dies - but not everyone lives