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?
Who is Participating?
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 

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

I hope this helps.
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.
Here is a good reference to help you understand when you want to use it or not as well:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.