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

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

    Those access modifiers specify where your members are visible. You should probably read this up. Take the link given by IainMH as a starting point.

    Static members are one per class and not one per instance.

提交回复
热议问题