ReSharper complains when method can be static, but isn't

前端 未结 8 1389
萌比男神i
萌比男神i 2020-11-28 08:43

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

8条回答
  •  广开言路
    2020-11-28 09:14

    You don't have to push "this" onto the function's stack for a static method. That's another reason it's cheaper.

提交回复
热议问题