Differance Between Protected and protected internal
-
Hello Friends, I want to know what is difference between protected and protected internal. i know that protected means access limited to type and types derived from it. and protected internal means access limited to type and types derived from it or in the assembly. Do protected is subset of protected internal. And do protected is required when we specify internal as access specifier. please give example that will be helpfull.. Thanks in advance. rahul kulkarni
-
Hello Friends, I want to know what is difference between protected and protected internal. i know that protected means access limited to type and types derived from it. and protected internal means access limited to type and types derived from it or in the assembly. Do protected is subset of protected internal. And do protected is required when we specify internal as access specifier. please give example that will be helpfull.. Thanks in advance. rahul kulkarni
Rahul.RK wrote:
I want to know what is difference between protected and protected internal.
According to the documentation[^] the answer is: protected = Access is limited to the containing class or types derived from the containing class protected internal = Access is limited to the current assembly or types derived from the containing class
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Ready to Give up - Your help will be much appreciated. My website
-
Rahul.RK wrote:
I want to know what is difference between protected and protected internal.
According to the documentation[^] the answer is: protected = Access is limited to the containing class or types derived from the containing class protected internal = Access is limited to the current assembly or types derived from the containing class
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Ready to Give up - Your help will be much appreciated. My website
-
hello Thanks for reply... i got the concept according to definition. But as internal gives access to all the assembly then what is use of protected? Thats my question.. Rahul Kulkarni
Rahul.RK wrote:
But as internal gives access to all the assembly then what is use of protected?
So you can derive a class from it from outside the assembly.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Ready to Give up - Your help will be much appreciated. My website
-
Rahul.RK wrote:
But as internal gives access to all the assembly then what is use of protected?
So you can derive a class from it from outside the assembly.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Ready to Give up - Your help will be much appreciated. My website
-
Thanks alot.... Will you please give me any helpfull site of book name which will give me idea of all this basic fundamentals of C#.Net Rahul Kulkarni
There are lots of beginner books. It really depends on your style of learning. Go to the book store and browse through a few books. Pick the one that appeals to you most.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Ready to Give up - Your help will be much appreciated. My website
-
There are lots of beginner books. It really depends on your style of learning. Go to the book store and browse through a few books. Pick the one that appeals to you most.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Ready to Give up - Your help will be much appreciated. My website