Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between protected and protected internal?

Answers were Sorted based on User's Feedback



What is the difference between protected and protected internal?..

Answer / lakshmi harathi

Protected: This also allows a class to hide its member
var. and member func. from other class objects and
function, except the child class. it becomes important
while implementing inheritance.
"it can be accessible into derived class with in the same
application "
"protected members can be accessed within the class and the
derived class"

Protected Internal: it's similar to Protected access
specifier, it also allows a class to hide its member
variables and member function to be accessed from other
class objects and function, excepts child class, within the
application. used while implementing inheritance.

Is This Answer Correct ?    9 Yes 5 No

What is the difference between protected and protected internal?..

Answer / anusha

Internal:
When Members of a class are declared as internal, then they can be accessed

1. within the class in which they are declared.

2. within the derived classes of that class available within the same assembly.

3. outside the class within the same assembly.

Protected:
When Members of a class are declared as protected, then they can be accessed

1. within the class in which they are declared.

2. within the derived classes of that class available within the same assembly.

3. within the derived classes of that class available outside the assembly.


Protected internal:
When Members of a class are declared as protected internal, then they can be accessed

1. within the class in which they are declared.

2. within the derived classes of that class available within the same assembly.

3. outside the class within the same assembly.

4. within the derived classes of that class available outside the assembly.

Is This Answer Correct ?    3 Yes 1 No

What is the difference between protected and protected internal?..

Answer / manu

protected is really protected inside and outside the assembly (protected internal / protected external) (not allowed on top level classes)

protected internal is really public inside the assembly but protected outside the assembly (public internal / protected external) (not allowed on top level classes)

Is This Answer Correct ?    0 Yes 0 No

What is the difference between protected and protected internal?..

Answer / mahi

Protected Internal: it's similar to Protected access
specifier, it also allows a class to hide its member
variables and member function to be accessed from other
class objects and function, excepts child class, within the
application. used while implementing inheritance.

Is This Answer Correct ?    1 Yes 2 No

What is the difference between protected and protected internal?..

Answer / sujai cn

protected :
The members which are declared as protected can only be
accesed from the derived class.

Internal :
In c# The members which are declared as Internal can only
be accessed "with in the assembly(dll or an exe)".

Thus when we declare a member as protedcted internal it can
be accessed by the derived class with in the same asssembly.

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C Sharp Interview Questions

Is java better than c#?

0 Answers  


Why can?t you specify the accessibility modifier for methods inside the interface?

3 Answers   Mind Tree, Siebel Systems,


Write a program to find the angle between the hours and minutes in a clock

0 Answers  


Define Abstract Class in C#

0 Answers   HCL,


Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

1 Answers  


What is Covariance and contravariance in C#?

0 Answers   HCL,


C# is case sensitive, what is mean by case sensitive

3 Answers  


Hai, I want to open a new form while the previous form is hiding or closing. I tried this with using MDI.I created one form like ParentForm.placed one button control.when clicked one that it opend new form like ChildForm.When i set the property of ChildForm to Maximize,but the ParentForm button control also appearing on the childform. so plz help me how to hide parentform controls(hide parentform while it is childform opened) thanq..

1 Answers  


What are the string functions in c#?

0 Answers  


What is default parameter in c#?

0 Answers  


What are the different states of a thread?

0 Answers  


How do you determine whether a string represents a numeric value?

0 Answers  


Categories