What's a “static method” in C#?

前端 未结 9 2167
再見小時候
再見小時候 2020-11-22 06:48

What does it mean when you add the static keyword to a method?

public static void doSomething(){
   //Well, do something!
}

Can you add the

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 07:18

    Core of the static keyword that you will have only one copy at RAM of this (method /variable /class ) that's shared for all calling

提交回复
热议问题