Protected and internal protected are behaving same .
What is difference between them?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jenith ThakkarRank #789 · 2.9K reputationPosted Jul 29, 2018, 11:49 PM EDT
Protected Member of a class in only available in the contained class (in which it has been declared) and in the derived class within the assembly and also outside the assembly.
Means if a class that resides outside the assembly can use the protected member of the other assembly by inherited that class only.
We can exposed the Protected member outside the assembly by inherited that class and use it in the derived class only.
Note: Protected members are not accessible using the object in the derived class.
Internal Member
Internal Member of a class is available or access within the assembly either creating object or in a derived class or you can say it is accessible across all the classes within the assembly.
Note: Internal members not accessible outside the assembly either using object creating or in a derived class.
Protected Internal
Protected Internal access modifier is combination Protected or Internal.
Protected Internal Member can be available within the entire assembly in which it declared either creating object or by inherited that class. And can be accessible outside the assembly in a derived class only.
Note: Protected Internal member works as Internal within the same assembly and works as Protected for outside the assembly.
Jaish MathewsRank #225 · 11K reputationPosted Jul 29, 2018, 11:44 PM EDT
Hemalatha Sunnapu195 reputationPosted Jul 29, 2018, 11:59 PM EDT
Jaish MathewsRank #225 · 11K reputationPosted Jul 30, 2018, 12:08 AM EDT
Hemalatha Sunnapu195 reputationPosted Jul 30, 2018, 12:14 AM EDT