What is use of extention method
The real time example of use of 3xtention method.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaimin ShethiyaRank #177 · 13.7K reputationPosted Aug 7, 2019, 12:36 AM EDT
Sai Kumar KoonaRank #334 · 7.5K reputationPosted Aug 7, 2019, 1:56 AM EDT
Minal Shah91 reputationPosted Aug 8, 2019, 12:47 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 8, 2019, 1:07 AM EDT
Bidyasagar MishraRank #766 · 3K reputationPosted Aug 8, 2019, 8:52 AM EDT
An extension method is a static method of a static class that can be invoked using the instance method syntax. Extension methods are used to add new behaviors to an existing type without altering. In extension method "this" keyword is used with the first parameter and the type of the first parameter will be the type that is extended by extension method.
Amit MohantyRank #112 · 20K reputationPosted Aug 7, 2019, 12:59 AM EDT
1. Extension methods cannot be used to override existing methods
2. An extension method with the same name and signature as an instance method will not be called
3. The concept of extension methods cannot be applied to fields, properties or events
For more info check the below link.
https://www.c-sharpcorner.com/UploadFile/puranindia/extension-methods-in-C-Sharp-3-0/
https://www.c-sharpcorner.com/blogs/when-should-we-use-extension-methods-in-c-sharp
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 25, 2019, 5:28 AM EST