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

Did vb6 support multi-threading ?

615


Tell us how many languages are supported by .net?

594


Explain the difference between c# and vb.net?

634


Explain how can we remove handlers at run time?

616


Name the two main parts of .net?

605






Explain nested classes?

628


Described strong typing

655


How do you define a read only property in a class module?

596


described weak typing?

676


What is static member?

651


Can you please explain the difference between vb and vb.net?

539


Compare c# and visual basic.net?

628


Explain strong name in .net assembly?

616


Why do you need Lock in Visual Basic?

719


Explain how the .net framework performs automatic memory management.

638