http://www.c-sharpcorner.com/UploadFile/puranindia/extension-methods-in-C-Sharp-3-0/
In above web page Extension Methods is explained.
Can you tell me please where I can find ClassLibExtMethod.dll file? As directed in the article to "Add the reference of the previously created class library to this project".
I couldn't see any ClassLibExtMethod.dll file in ClassLibExtMethod folder.
I use VS 2012 Express.
Loading

VulpesRank #55 · 29.2K reputationPosted Jul 18, 2014, 3:44 PM EDT
I've had to alter the code in the Main method slightly to get it to print the same output as in the article.
Abhishek KumarRank #510 · 4.8K reputationPosted Jul 18, 2014, 6:17 AM EDT
You need to create a new Class Library project named ClassLibExtMethod as explained in the article.
After building successfully dll will be created and you can use that .dll in your project.
Hope this make it clear.
Abhishek
Posted Jul 18, 2014, 6:27 AM EDT
I attach what is in ClassLibExtMethod folder.
Abhishek KumarRank #510 · 4.8K reputationPosted Jul 18, 2014, 8:05 AM EDT
Bin-> debug folder then you will able to see the dll created after successful build.
Posted Jul 18, 2014, 8:15 AM EDT
Pradeep ShetRank #595 · 4K reputationPosted Jul 18, 2014, 12:07 PM EDT
Posted Jul 18, 2014, 12:21 PM EDT
Posted Jul 18, 2014, 4:52 PM EDT
Quoting your example, please explain why it is called extended method.
VulpesRank #55 · 29.2K reputationPosted Jul 19, 2014, 12:06 AM EDT
Although they're really just static methods (and can be called as such if you want) they're made to look as though they're instance methods of the type in question.
Posted Jul 19, 2014, 8:21 AM EDT