In C#, what is the difference between public, private, protected, and having no access modifier?

前端 未结 16 3090
盖世英雄少女心
盖世英雄少女心 2020-11-22 01:12

All my college years I have been using public, and would like to know the difference between public, private, and protected

16条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 02:16

    mmm...

    Static means that you can access that function without having an instance of the class.

    You can access directly from the class definition.

提交回复
热议问题