I cant figure out why Microsoft has made it compulsory to define the extension methods in static class. What is the reason behind it?
Asked
Active
Viewed 15 times
0
-
Does this answer your question? [Why are extension methods only allowed in non-nested, non-generic static class?](https://stackoverflow.com/questions/3930335/why-are-extension-methods-only-allowed-in-non-nested-non-generic-static-class) – Fourat Nov 27 '19 at 10:20
-
It says extension methods were designed to make LINQ work and LINQ only needs extension methods in static, non-generic, non-nested classes to work. But I could not get the reason why LINQ needs static extension classes only? – manisha tayal Nov 28 '19 at 11:20