Diffrence between protected and protected internal


Diffrence between protected and protected internal


Diffrence between protected and protected internal

Protected:


1.In case of protected access is limited to the containing class or types derived from the containing class.

2.This can be accessed within same project as well as outside(by inheritance)   of the project,only access in child class(by inheritance) simply call the   method.

3.The protected member can not be accessed by creating the object of class.


Protected Internal:

1.Access is limited to the current assembly or type derive from the containing class.

2.This can also be accessed within same as well as outside the project but also can be accessed as internal.

3.Protected interna member can be accessed by creating the object in same project only.

4.It behaves like Protected+Internal.


[See More About Modifier]


Previous
Next Post »

2 comments

Click here for comments