Explain the Scope of
public/private/friend/protected/protected friend.

Answer Posted / srikanth

Public is accessible to all classes and projects.

Private is accessible only in the block that is declared.

Friend is accessible only to all classes in the current
project only.

Protected is accessible to only the class the is declared
and the class that is derived from that class.

Protected Friend is accessible to all the classes in the
current project and all classes derived from those classes.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is new in .net core?

490


Why do we use msmq?

603


What is the best way to crack the certification?

1376


What is the concept of inheritance and how it works in .net?

544


Describe session handling in a webform, how does it work and what are the limitations?

575






What is your observations between vb.net and vc#.net?

543


Explain how to redirect tracing to a file?

557


Is .net 4.8 backwards compatible?

550


What is deferred execution vs. Immediate execution in linq?

571


Define satelite assembly?

569


What are asp.net authentication providers and iis security?

535


What does jit compilation do in .net?

580


Can a try block have nested try blocks?

603


Can I write my own .net host?

625


What is common type system (cts)?

561