方法可以静态化,但应该这样吗? - Method can be made static, but should it?

问题:

ReSharper likes to point out multiple functions per ASP.NET page that could be made static. ReSharper 喜欢指出每个 ASP.NET 页面的多个可以静态化的功能。 Does it help me if I do make them static?如果我确实让它们静态,它对我有帮助吗? Should I make them static and move them to a utility class?我应该让它们静态并将它们移动到实用程序类吗?


解决方案:

参考一: https://stackoom.com/question/i3u
参考二: Method can be made static, but should it?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章