Passing Delegates as Parameters in C#(myviewstate.net)

submitted by kevinbabcockkevinbabcock(345) 3 years ago

C# delegates are fun to use. They let you encapsulate a bit of logic in a nice, neat little object that behaves like a method. All you have to do is declare the signature of the method that the delegate can reference without having to specify the actual method itself. This allows you to define how a method should be used but defer its implementation to another place in the application, giving it a polymorphic behavior. You can call the delegate directly or pass it as a parameter to another method, thereby “delegating” its functionality...

add a comment |category: |Views: 60

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story