All my college years I have been using public, and would like to know the difference between public, private, and protected
public
private
protected
Reposting the awesome diagrams from this answer.
Here are all access modifiers in Venn diagrams, from more limiting to more promiscuous: private: private protected: - added in C# 7.2 internal: protected: protected internal: public:
Here are all access modifiers in Venn diagrams, from more limiting to more promiscuous:
private:
private protected: - added in C# 7.2
private protected
internal:
internal
protected:
protected internal:
protected internal
public: