Duck Typing In C# 3.0(hcoding.blogspot.com)

submitted by ksh2dotnetkicksksh2dotnetkicks(135) 3 years, 9 months ago

In C# 3.0 we achieve this feature by employing Extension Methods. The whole point came straightly from definition of Extension Methods, where says: "An extension method with the same name and signature as an interface or class method will never be called.". That means we can call a method on objects without providing a specific type for the compiler. Of course we have the choice to add the extension methods to just one type/class of objects; that for example have implemented a specific interface.

add a comment |category: |Views: 19

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