Link to home
Start Free TrialLog in
Avatar of solraccheffy
solraccheffy

asked on

difference between internal and protected

i need to understand that difference between the two, to me the definitions I read, make them sound the same...I need to understand this better...
I know there are other...private and stuff...but I dont quite understand the difference between protected and internal.....some non technial explanations please.
Avatar of wwnosal
wwnosal

Hi internal is just visible in files in same assembly unit (usually same project/solution).
Protected is visible in all derived classes (so classes that inherit after the class where you have defined protected members. )

so if you build a library  a put class A there using internal members and then try to derive class A in different project it will not work, however if you use them as a protected ones they will be visible in class derived from A.

Hope this helps
Avatar of solraccheffy

ASKER

when you say assembly you mean the same dll right? I want to make sure I dont confuse assembly with classes...because aren't there some that only are available in class...as opposed to the entire dll?
I get lost in terminology....just want to have it simplified...like...dervied?
could you clarify a bit more?
also...isnt there another one protectedinternal?
how does that differ?
ASKER CERTIFIED SOLUTION
Avatar of wwnosal
wwnosal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial