Qus:    What is the extension method for a class?
Oct 12, 2020 13:54 DotNet 2 Answers Views: 1104 FRAUSKY
Prev Next
Answers (2)
TEJA Oct 13, 2020 06:55
Answer:   The extension method is used to add new methods in the existing class or the structure without modifying the source code of the original type. Special permission from the original type or re-compiling it isn’t required.

PARTH Oct 13, 2020 12:18
Answer:   Extension methods allow existing classes to be extended without relying on inheritance or having to change the class's source code. If the class is sealed than there in no concept of extending its functionality and so we introduce an extension method for the same.

Post Your Answer
Guest User

Not sure what solution is right for you?

Choose the right one for you.
Get the help of the experts and find a solution that best suits your needs.


Let`s Connect