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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mageshwaran RPosted Nov 25, 2019, 10:28 AM
Bidyasagar MishraPosted Aug 8, 2019, 12:52 PM
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.
Rajanikant HawaldarPosted Aug 8, 2019, 5:07 AM
Minal ShahPosted Aug 8, 2019, 4:47 AM
Sai Kumar KoonaPosted Aug 7, 2019, 5:56 AM
Amit MohantyPosted Aug 7, 2019, 4:59 AM
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
Jaimin ShethiyaPosted Aug 7, 2019, 4:36 AM