Static classes and static members

I'm working with a new team of C# programmers, most of my background is in C++.  Because of a tool named Resharper the team makes almost all code static.  (The tool suggest when something can be made static.)
Is this really a good idea?  Even for code that may seldom get executed?  I have found white papers about improved performance but what about overall efficient memory usage.  Stack vs Heap kind of stuff?
wilfordrocksAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edemcsCommented:
Yes, use static method when you do not need to instantiate an object in the heap.  If all you need to do is execute a method and not persist the object itself or keep any members populated, the static method is ideal.  The stack is immediately popped where the heap will keep the object unti gargabe collection runs.
edemcsCommented:
Here is a good reference to help you understand when you want to use it or not as well: http://channel9.msdn.com/Forums/TechOff/252598-When-to-use-Static-vs-Instance-Classes
wdosanjosCommented:
Interesting question.  Though static classes provide better performance than regular classes, it's not a good OO practice to abuse them (see link below):


Otherwise, you are correct regarding the performance of static classes vs. regular classes (see quote below).  Instances of any class use heap memory, given that static classes do not need an instance you would in theory save heap memory by using static classes.

A call to a static method generates a call instruction in Microsoft intermediate language (MSIL), whereas a call to an instance method generates a callvirt instruction, which also checks for a null object references. However, most of the time the performance difference between the two is not significant.

From: Static Classes and Static Class Members
http://msdn.microsoft.com/en-us/library/79b3xss3.aspx 

Value-type objects such as structs are created on the stack, while reference-type objects such as classes are created on the heap. Both types of objects are destroyed automatically, but objects based on value types are destroyed when they go out of scope, whereas objects based on reference types are destroyed at an unspecified time after the last reference to them is removed.

From: new Operator
http://msdn.microsoft.com/en-us/library/fa0ab757.aspx

I hope this helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.