ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  VB.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What is the DIfference  between Friend and Protected Friend?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the DIfference between Friend and Protected Friend?
Answer
# 1
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 ?    8 Yes 4 No
Rajeev Pradhan
 
  Re: What is the DIfference between Friend and Protected Friend?
Answer
# 2
friend------access is limited to the current assembly
(application)
protected friend----access is limited to the current 
assembly and types derived from the containing class..
 
Is This Answer Correct ?    4 Yes 4 No
Vimal
 
 
 
  Re: What is the DIfference between Friend and Protected Friend?
Answer
# 3
Protected --> Accessible ONLY by 1.Derived classes 2.Within 
the same class

Friend --> Accessible ONLY by 1.Derived classes 2.Classes 
in the same assembly 3.Within the same class

Protected Friend --> Accessible ONLY by 1.Derived classes 
2.Classes in the same assembly 3.Within the same class


This is a very strange prob for which I've been looking for 
an answer for a long time. As you can see above Friend and 
Protected Friend are exactly same simply because 'Friend' 
encompasses the accessibilities of both Protected and 
Protected Friend. The question here is  why did Microsoft 
publish a 'Protected Friend' keyword when it is EXACTLY 
same as Friend.
 
Is This Answer Correct ?    5 Yes 6 No
Kuru
 
  Re: What is the DIfference between Friend and Protected Friend?
Answer
# 4
Friends can be accessed by all classes within assembely but 
not from outside the assembely.

Protected variables can be used within the class as well as 
the classes that inherites this class.

The Protected Friend can be accessed by Members of the 
Assembely (Friend) or the inheriting Assembely class 
(Protected).

So Friend is not same as Protected Friend
 
Is This Answer Correct ?    8 Yes 3 No
Vineeta Agarwal
 
  Re: What is the DIfference between Friend and Protected Friend?
Answer
# 5
I guess the difference is this:
Friend can be accessed by
1. Code within the class
2. Code in derived classes within the same assembly
3. Other code in the same assembly

Protected can be accessed by
1. Code within the class
2. Code in derived classes within the same assemblies
3. Code in derived classes in other assemblies

Protected Friend can be accessed by
1. Code within the class
2. Code in derived classes within the same assembly
3. Other code in the same assembly
4. Code in derived classes in other assemblies
 
Is This Answer Correct ?    23 Yes 2 No
Benjamin Marty
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
What is MSIL. HDFC3
Is there any easy way to convert VB6 programs to VB.Net?  3
How do you validate Date by using which validation Control? HCL3
Display a roll having minimum marks in two subjects? Patni1
Can we use a crystal report into a another crystal report  6
What is the Difference between Overriding and overloading?  11
What does VS.NET contains ? Infosys3
how to create views in sql with syntax and example  5
How do you rate yourself in .NET ? Infosys3
what are the advantage in vb.net and different between vb and vb.net TCS4
What is the difference between Abstract Classes and Interfaces? Give the answer as a table format....  5
Where would you use Abstract class and Interface?  2
linex will support dot net? Phoenix-Technologies4
sir how i can calculate the value of two-textbox of gridview and show result in textbox within gridview in asp.net with vb.net..plz sir reply me Biz-Technology1
What is CLR?  11
How to store jpeg / gif / bmp image in database and how to retrieve them? The most stressful condition is database is distributed and stored images can be retrive from any computer in network and any one can store images from other computer!! plss help its urgent.......RAHUL RATHOD  2
hello! I am developing software in vb6 and vb.net separately which i need to generate barcodes e.g i have a string "182346-u",so the problem is that how to generate barcode from this type of string can any body help me please thanks regard !  2
How to Insert a TextBox value in to Sql database using VB.Net coding?  3
Trace and Debug belongs to which namespaces?  4
ColumnMapping belongs to which namespaces?  1
 
For more VB.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com