.Net has five access Specifiers:-

Public-- Accessible outside the class through object reference.

Private-- Accessible inside the class only through member functions.

Protected-- Just like private but Accessible in derived classes also through member functions.

Internal-- Visible inside the assembly. Accessible through objects.

Protected Internal-- Visible inside the assembly through objects and in derived classes outside the assembly through member functions.

Let’s try to understand by a practical example:-

results matching ""

    No results matching ""