Explain about Protected and protected internal, ?internal?
access-specifier?

Answer Posted / sumathi

Protectd :

Method declared as Protected,means it is accessible only in
it's derived classes.
So with this access specifier we can provide more security
to the class members.

Protected internal:

Methods or varibales are declared as protected internal are
accessible in the derived classes but outside the assembly
also.

Internal:
Member Methods or member variables declared as internal are
accessible with in classes of the same assembly.

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use get set in c#?

595


Explain the features of an abstract class in net.

591


Can we inherit class that contains only one private constructor?

603


Could you explain the difference between func vs action vs predicate?

534


Can we call server-side code (c# or vb.net code) from javascript?

603






What is the xml document structure?

558


What are the Types of JIT and what is econo-JIT

902


Does c# do array bounds checking?

617


What is private variable?

562


What is the use of return in c#?

571


Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

597


What is generic in c#?

540


Why is main static in c#?

587


What is a console?

588


Will the following code compile?

631