+ 2
What is Purpose of Internal access specifier in C# with example?
help me to understand.....
2 odpowiedzi
+ 1
The internal access specifier hides its member variables and methods from other classes and objects, that is resides in other namespace. The variable or classes that are declared with internal can be access by any member within application. It is the default access specifiers for a class in C# programming.
0
We can declare a class as internal or its member as internal. Internal members are accessible only within files in the same assembly (.dll).
In other words, access is limited exclusively to classes defined within the current project assembly.
Accessibility
In same assembly (public) :
Can be accessed by objects of the class
Can be accessed by derived classes
In other assembly (internal) :
Cannot be accessed by object
Cannot be accessed by derived classes