Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C#

C#

Scheduled Pinned Locked Moved C#
csharp
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11114253
    wrote on last edited by
    #1

    why delegates are used in c#

    OriginalGriffO B 2 Replies Last reply
    0
    • U User 11114253

      why delegates are used in c#

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      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...

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      B W 2 Replies Last reply
      0
      • U User 11114253

        why delegates are used in c#

        B Offline
        B Offline
        BillWoodruff
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          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...

          B Offline
          B Offline
          BillWoodruff
          wrote on last edited by
          #4

          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

          OriginalGriffO 1 Reply Last reply
          0
          • B BillWoodruff

            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

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #5

            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...

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              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...

              W Offline
              W Offline
              Wayne Gaylard
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups