Extension Method in Dot.Net 3.5

Posted by Kumar_jay99 under ASP.NET on 5/2/2011 | Points: 10 | Views : 4291 | Status : [Member] | Replies : 2
what is extention Method?
how it is beneficial for us . is there any disadvantage extension method
can i use extension method for DLL??




Responses

Posted by: SheoNarayan on: 5/2/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hello Kumar,

Extension method allow us to add new method to the existing class and that class can be .NET out of the box class or any class written by others. It is generally used when you do not have permission or flexibility to write methods for that class however by convention or your need you want to attach a new method to that class.

Read below articles that should help you understanding Extension methods

http://www.dotnetfunda.com/articles/article261.aspx
http://www.dotnetfunda.com/articles/article445-extension-method-net-35-and-above-.aspx

Thanks


Regards,
Sheo Narayan
http://www.dotnetfunda.com

Kumar_jay99, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sashys on: 5/2/2011 [Member] Starter | Points: 25

Up
0
Down
Hi ,
I gone thru the below sites and found the usefull information on Extension methods..
http://www.codeproject.com/KB/dotnet/LINQ.aspx
http://www.codeproject.com/KB/cs/ExtensionsAndAlog.aspx
http://weblogs.asp.net/andrewrea/archive/2008/05/25/extension-methods-inside-net-3-5.aspx

Helped me to understand.. Please see if it helps you!!

Sasikumar .M

Kumar_jay99, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response