What is the DIfference between Friend and Protected Friend?

Answer Posted / rajeev pradhan

Protected variable will be accessed in inherited class, but
instance variable of class cant access protected variable.

While friend variable will be accessed in inherited class
as well as instance variable of class across the project.

Where we need both functionality we are using protected
friend scope.

Is This Answer Correct ?    25 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between system.string and system.stringbuilder classes?

537


What is a static class?

599


What is the difference between readonly variable and constant variable?

565


What is a stream in vb.net?

530


difference between checkbox vs radiobutton??

2493






What is the difference between a "jagged array" and multidimensional array" ?can anyone show me it practically ?

557


Define clr?

551


Allowed program to auto-correct the database when loading a presentation.

1749


What is the difference between c# and vb.net?

564


Explain the observations between vb.net and vc#.net?

532


What is misl code?

569


What is a preprocessor directive in vb.net?

548


How do you retrieve the customized properties of a .net application from xml .config file?

519


Explain cls?

597


What are nested classes?

542