Why does ReSharper complain when a method can become static, but is not?
Is it because only one instance of a static method is created (on the type) and thus save on performance?
I find that comment very useful as it points out two important things:
It makes me ask myself if the method in question should actually be part of the type or not. Since it doesn't use any instance data, you should at least consider if it could be moved to its own type. Is it an integral part of the type, or is it really a general purpose utility method?
If it does make sense to keep the method on the specific type, there's a potential performance gain as the compiler will emit different code for a static method.
2.1m questions
2.1m answers
60 comments
57.0k users