What is internal protector?
What is internal protector?
847
11-Oct-2019
Updated on 11-Oct-2019
Om ji mishra
11-Oct-2019protected internal is a keyword and access modifier also. We use this keyword for restricted unwanted data using out of assembly and inherit classes.
Firstly we have to know that when we use an internal access modifier that means we can use those methods the same assembly or out of the assembly and when we use protected that means we can use those methods in any other inherited class.
Now when we use both access modifiers(protected internal) then we can use those methods out of assembly and inherited class also.
Some important things about protected internal access modifier: -
or out of the assembly in the derived class by creating an object of the derived class.
keyword in the derived class.
Syntax: - base.<method name>();
keyword the derived class.
Syntax: - this.<method name>();
Code: -(Without inherited class)
Output: - My name is Om Ji Mishra
Code: - (With inherited class)
using System;
Output: - My name is Om Ji Mishra