Possible Duplicate:
Extension Method Performance
Will I face performance issues when I´m using extension methods too heavy in any way?
Just an example:
Lets say I´ve 100 extension methods on the type string and a business object that has 50 string properties. Now I create a collection of this business object, maybe 500 items?
Do these extension methods on string have any impact to RAM, CPU, ...?!
I really like extension methods but I´d like to know if there is a limitation concerning its usage.
No you will not.
Extension methods are just normal static methods with some syntactic sugar. Use them as much as you want :)
You might slow intellisense down in the IDE - and possibly make the intellisense lists a bit unwieldy, but it won't have any impact on the execution of the code itself over any other static method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With