Possible Duplicate:
What are Extension Methods?
Hi,
After googlin got to know a bit about Extension methods but not very clear why we need to use extension methods and how does it work?
Please suggest.
Thanks,
Subhen
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Refer to this question – What are Extension Methods?
Somehow, I don't agree to the idea of using extension methods to extend an existing type since practically this is impossible.The only reason why you want to use extension method is to bringfluency and readabiltyon any type.Check this code..
This code with extension methods can be written as below.
which one is more fluent and readable ? The one with the extension methods.