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



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

Answer / 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

More Dot Net General Interview Questions

How do you generate a strong name?

0 Answers  


Value type & data types difference. Example from .NET.

2 Answers   TCS,


Write code for fetch record nos 15 to 25 from a dataset containing 50 records?

4 Answers   C Squared Systems,


Explain what relationship is between a process, application domain, and application?

0 Answers  


What is Active Directory? What is the namespace used to access the Microsoft Active Directories? What are ADSI Directories?

1 Answers   TCS,






What are nullable types in .NET

0 Answers   TryTechnicals Pvt Ltd,


Explain about the Common Language Runtime?

0 Answers  


What is Atomicity?

3 Answers   Verifone,


i have 2 functions, int add(int a,int b); double add(int a,int b); does this code implement overloading? if not what will be the error?

4 Answers   Deloitte,


Explain what is the difference between a class and an object, and how do these terms relate to each other?

0 Answers  


What are the types of assemblies in .net?

0 Answers  


Is .net is platform independent. If am using solaris, installing .net first u had to install framework, so framework is .exe file then it will not take in solaris or any other than windows,then how .net is platform independent.

1 Answers  


Categories