Access Specifiers In .Net
Public --
As name specifies, it can be accessed from anywhere.If a member of
class is defined as public then it can be accessed anywhere.
Private -- Accessible inside the class only through member functions.
Protected -- protected variables can be used with in the class as well as the classes that inherits this class
Friend/Internal --
Friend and Internal mean the same. Friend is used in VB.Net.Internal is
used in C#. Internal can be accessed by all classes with in an assembly
but not from outside the assembly.
Protected Internal -- Visible inside the assembly through objects and in derived classes outside the assembly through member functions.
No comments:
Post a Comment