Login
Register
Tutorials
Forum
Career Development
Resources
Reviews
Jobs
Interview
Communities
Projects
Training
Silverlight Games
|
Bookmarks
|
New Members FAQ
|
Mentor
|
Code Converter
|
IT Companies
|
Peer Appraisal
|
Members
|
Revenue Sharing
|
Computer Jokes
|
New Posts
|
Social
|
Talk to Webmaster Tony John
Online Members
Shine S
mrdb
imtiyaz
srirama
More...
Forums
»
.NET
»
.NET
»
Differnce between internal & protected internal access specifier ?
Posted Date:
19 Feb 2009
Posted By::
venkatesh vadde
Member Level:
Silver
Member Rank:
2627
Points
: 1
Responses:
2
mmm...I may be confussed, but this is what I understand...
protected -> the class itself and any inheriting class can access this method or propetry
internal -> ANY class within same assembly can access this method/property, meaning any class within the same VS Project, exe, or dll can access it, whether it's inheriting it or not can get to it
protected internal -> the class itself (where it's declared), the inheriting class(es), and just like internal, it can be access throughout our assemby by any class or part of assembly
based on the above, what is the real need for "protected internal"? If I want a method to be accessible by the base class, all inheriting classes, and throughout the assembly as well, then I can just declare it internal, why dcelare it protected internal? what does it gain me, other than the extra keyword?
Tweet
Responses
#348899 Author:
Kartheek Reddy .N
Member Level:
Silver
Member Rank:
0
Date: 19/Feb/2009 Rating:
Points
: 2
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/135f6582-7144-496d-a35b-be9ec90f8332/
check this this might help
and I doubt u have already seen it
Kartheek Reddy .N / GGK Technologies Inc – www.ggktech.com
#348978 Author:
Deepthi
Member Level:
Bronze
Member Rank:
7584
Date: 19/Feb/2009 Rating:
Points
: 4
Hi,
Let me Share one single point on this...
What you say is correct, when you are thinking of in one particular Assembly But the scenario changes with multiple assemblies.
Answer to your Point: what is the Need for protected internal?
Let me describe the scenario.
I have a classBase with somemethod which is needed in myAssembly,
and in someclasses of other other Assemblies which inherits the Base class
--> then what is the Access we have for Some Method() in order to access it in MyAssembly and OtherAssemly
DemoOfProtectedInternal.zip
Post Reply
This thread is locked for new responses. Please post your comments and questions as a
separate thread
.
If required, refer to the URL of this page in your
new post
.
Tweet
Next :
DatagridViewComboBoxCell problem
Previous :
I want T-SQL FAQ. Pls help me
Return to Discussion Forum
Post New Message
Category:
Related Messages
Is there any expert to solve this?
what is difference between String and string(data type) in c#?
what is a resource file...
Horizontal Scroll Bar for a listview control
sql querry
Follow us on Twitter:
https://twitter.com/dotnetspider
Active Members
Today
Pawan Awasthi
(49)
srirama
(7)
Phagu Mahato
(7)
Last 7 Days
baskar
(298)
Asheej T K
(173)
Ultimaterengan
(167)
more...
Awards & Gifts
Email subscription
.NET Jobs
.NET Articles
.NET Forums
Articles Rss Feeds
Forum Rss Feeds