Method can be made static, but should it?

后端 未结 14 1217
说谎
说谎 2020-11-22 17:16

Resharper likes to point out multiple functions per asp.net page that could be made static. Does it help me if I do make them static? Should I make them static and move them

14条回答
  •  悲&欢浪女
    2020-11-22 17:35

    ReSharper does not check the logic. It only checks whether the method uses instance members. If the method is private and only called by (maybe just one) instance methods this is a sign to let it an instance method.

提交回复
热议问题