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

前端 未结 16 2987
盖世英雄少女心
盖世英雄少女心 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:18

    Regarding the question of Nothing

    • Namespace types are internal by default
    • Any type member, including nested types are private by default

提交回复
热议问题