問題:
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?