Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Extension Methods on base types, How much does this weigh down the system?

$
0
0

I have heard this going back and forth and wanted a semi-definitive answer.   I have been told that extension methods are only valuable on classes you create, since adding it to a base adds it to EVERY base type so an [string ParseString(this string)] would now weight down every string I wrote that referenced the DLL that contained the Extension method.   However if you create a class why would you need an extension method you could just call it on the class statically.   I have been using extension methods heavily for fluent coding and wanted to know if there is a "best practices".

Help... Long time developer

Mark


Mark Rowe MCPD:Windows, MCPD:Web, MCPD:Azure, MCTS:Biztalk http://MicrosoftIntegrationArchitect.com


Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>